Detecting a new record on a subform

D

David C. Holley

I need to change which controls are displayed if the user is on a new
record. I'm trying to use the isNewRecord() function to handle this,
however the function is not detecting that the user has moved to a new
record when I click on the NEW RECORD navigation button.

As you can guess, I'm trying to detect when a new record has been added
to a subform/when the subform has moved to a new record.

David H
 
P

Paul Overway

You need code in the Form_Current event for the subform, i.e.,

If Me.NewRecord then
'Hide controls
Else
'Unhide controls
End if

You also need to call Form_Current from Form_Afterupdate (so the controls
will be shown after record is added).

One post on a given topic is sufficient. Multiple posts aren't going to
help any unless you are clarifying something, in which case you should post
under the same thread.
 
D

David C. Holley

Sorry about the double posting. I posted the first message and then
realized that I could state the problem a bit easier and forgot to
cancel the first.
 
Top