Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicate action from db to html using If null

Status
Not open for further replies.

annalyst

IS-IT--Management
Nov 16, 2003
4
US
Hi I have a db form that performs an action I want to duplicate it on a web page. It calls a specific query with equipment that has calibration dates, if the query has records with items dated less than the current date a stop sign appears, if there are any records with dates that are within the upcoming month then a caution sign appears. If the dates are beyond 30 days than the form opens and displays its normal functions of buttons and stuff. I already have data access pages for the queries at the server and a duplicated page has been created with the links already connected, but all the signs will appear until I figure out the code to have them only show up as noted above.(The signs are linked to the query so you can open it up and view the item that is out of date.) I tried some if statements but they don't seem to work. Any suggestions?
Thanks Annalyst
 
I was afraid someone would ask that. I don't have the exact code I used on the html it is on a server at work. I built the db at home and it is similar to this, but I didn't use the Nz function I used Null.

If Nz(DCount("*", "OTP-2 StopError"), 0) > 0 Then
cmdOTP2SE.Visible = True
OTP2.Visible = False
Else
cmdOTP2SE.Visible = False
OTP2.Visible = True
End If

I am limited on my html coding abilities and little out of my environment (okay a lot) any help is always appreciated.
Thanks Annalyst
 
What you're asking cannot be done in html. Html is a presentation language and such does not contain conditional elements. First what you need to do is contact your hosting company which (if any) server side language they offer and which databases you can use and then ask the question in the relevant forums. Todays most popluar formats are php and asp, both have excellent specialized forums here on tek-tips:

forum434 - php
forum333 - asp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top