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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Colour dependent on a date field not null

Status
Not open for further replies.

Dilly

Technical User
May 28, 2001
41
GB
I have a demands database. It contains two tables of new demands and historical demands. I have created a union query to combine both tables and have created a form from this data. On the form i have some of the infomation, I am trying to make one of the fields a differant text colour dependant on wheteher the demand has been recieved. I want black for oustanding and red for received. I am having problems with the idea of looking for a null for no date in the received field and a short date if the item has been recieved.
 
Hi!

Try this:

If IsNull(YourDateField) = True Then
YourTextBox.ForeColor = (the appropriate color number)
Else
YourTextBox.ForeColor = (the other color number)
End If

Alternatively you can use the IsDate function.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top