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

If one field has a date... make another field update with...

Status
Not open for further replies.

jsbaby80

Technical User
Jan 15, 2004
10
0
0
US
If I enter a date in a certain field, I want a field on the form that is a combo box to automatically update to "Picked Up". How can I do this?
 
is that certain field formatted in a date format?

If so use the after update event to set the combo box to "Picked Up"
 
Do I set the after update on the combo box or the field? (yes the field is in date format)
 
I guess I don't know the correct way to do this; I can't get it to work. I want the combo57 box to say "Picked Up" when there is a date in the Picked Up field...
 
Ok try using the form current event

Example

Private sub Form_Current()

'Check to see if a date is in the field
If IsNull(fldPickedUp) or fldPickedUp = "" Then
'there is nothing in the field
Else
cmbPickedUp = "Picked Up"
End if

End Sub


This should change the combo box value as you scroll through the records. On the Field after update put this code:

Private Sub fldPickedUp_AfterUpdate()

cmbPickedUp = "PickedUp"

End Sub

and that should take care of it for you.

HTH

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top