How to make hidden fields permanently appear when another field is changed?

DLe

New member
Local time
Today, 08:39
Joined
Jan 15, 2015
Messages
6
hello...i need some help and i'm hoping someone will have the answer.

i have a form that shows payments (checks) that have been issued. sometimes those checks need to be voided and i want 2 fields (Updated By and Updated Date) to pop up when the payment distribution field is changed to a void status.

payment distribution: "I" for issued and "V" for void

i've gotten the On Change Event to work with VBA when the payment distribution changes from "I" to "V" and the 2 new fields pop up but if i exit the form and go back in to look at that record, the fields are gone. Is there a way to make the fields permanently if the payment is "V" on the form?

this is what i have so far for the On Change Event:

If [payment distribution] = "V" Then
me.cmbo_UpdatedBy = True
me.txt_UpdatedDate = True
Else
me.cmbo_UpdatedBy = False
me.txt_UpdatedDate = False
End If

End Sub
 
Check out the On Current event, that's the ideal spot for your code.
 
Put the same code in the Form's OnOpen event.

Better create it as another sub and call this sub from both events.
 
Thank you essaytee! It worked perfectly when I used the same VBA for the On Current Event. Thanks again!
 

Users who are viewing this thread

Back
Top Bottom