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

If then stament in VBA

Status
Not open for further replies.

roles40

MIS
Aug 20, 2003
21
US
Sorry for the horrid question, but I can't seem to figure this out. I have a combo box that has two values in it, pending and completed. I want a text box to update to the current day when the value in the combo box is changed to completed. This is all on a form by the way. I tried to use the OnChange event procedure, but couldn't figure out how to say in VB

if (IssueStatus = 'Completed') then
DateComp = Date();

so if anyone can help, you would be appreciated greatly.


Thanks in advance!!

Jamie
 
Try the After Update event of the Combo "IssueStatus ":

If Me!IssueStatus = "Completed" Then
Me!DateComp = Date
End If

Bill
 
Bill,

thanks for the code, works great.

u da man

Thanks!!!!

Jamie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top