PDA

View Full Version : Solved: Need help conditionally updating a form field



OrbeaRider66
08-20-2010, 05:41 AM
Okay, I'm really stuck here. I'm new to using VBA but am familiar with how it all works. My problem is that I just can't seem to figure out how to make everything work properlyl and, until I can get some sort of VBA training, I really need help.

I have a table (tblIncident) with two fields: status and closed_by. I'm trying to use VBA to set closed_by to "Trent" whenever status changes to 2. I've searched all over the internet for help on how to do this but nothing I've found works.

Any suggestions? I'd appreciate any help I can get.

Thanks!

OrbeaRider66
08-20-2010, 06:54 AM
I got my answer ... I was just way overthinking things. I just had to add this AfterUpdate code:

If cboStatus = "2" Then
closed_by = "Trent"
closed_dt = Now()
MsgBox ("Closed_By has been updated.")

I'm good to go.