Access - form- new record

D

DianaH

I have a form, and a sub form. WHen you are done entering data on the sub
form and click add new records (>*) I want to return to the the main form -
but the cursor stays on the sub form. I can't find a way to attach a macro
when you click new record to close the sub form and open the main form. HELP!
 
S

Steve

You can click the new record navigation button on the main form to go to a
new record simultaneously in the main form and subfom. Put the following
code in the Current event of the main form:
If Me.NewRecord Then
Me!NameOfFirstFieldOn MainForm.SetFocus
End If
The code will take you to the first field on the main form when you go to a
new record.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
[email protected]
 
Top