How do I update on changing records?

retro

Registered User.
Local time
Today, 11:56
Joined
Sep 5, 2003
Messages
69
I have a form (Games) based on a table of the same name. There are two combo boxes in the table (both lookup from other tables). These are called GameFormat and GameMediaType.

I only want GameMediaType to be visible when one value is chosen in GameFormat. I used the following as an AfterUpdate event for GameFormat:

Code:
Private Sub GameFormat_AfterUpdate()
If GameFormat.Value = 1 Then
GameMediaType.Visible = True
Else: GameMediaType.Visible = False
End If
End Sub

This works great on the current record. It will hide and show the combo box as required. However, when I load the form, or change record, it ignores this code. I can see that this is, of course, because the combo box has not been updated, but how do I get it to hide or show when I load a new record?

Thanks in advance for any assistance!
 
You need similar code in the current event of the form.
 
That worked great, thanks!
 

Users who are viewing this thread

Back
Top Bottom