New Parent Record from Navigation Buttons

S

Shadow

Using Access 2003 with form & subform each with navigation buttons at the
bottom of their respective forms. Record data is entered in main form and
then tab to subform and add 3 or 4 new records.

When in click on new record button on the main forms navigation buttons, I
get a new blank form and subform. Unfortunately my cursor is on a field on
the subform and if data entry starts with no main form data there is error
message and lots of problems.

How do I make the new form\subform open on field ISLot on the main form?
 
J

Jeanette Cunningham

Hi Shadow,
try this
On the main form's current event put code

On Error ResumeNext
If Me.NewRecord = True Then
Me.[IsLot].SetFocus
End If

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
S

Shadow

Jeanette Cunningham said:
Hi Shadow,
try this
On the main form's current event put code

On Error ResumeNext
If Me.NewRecord = True Then
Me.[IsLot].SetFocus
End If

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

Shadow said:
Using Access 2003 with form & subform each with navigation buttons at the
bottom of their respective forms. Record data is entered in main form and
then tab to subform and add 3 or 4 new records.

When in click on new record button on the main forms navigation buttons, I
get a new blank form and subform. Unfortunately my cursor is on a field
on
the subform and if data entry starts with no main form data there is error
message and lots of problems.

How do I make the new form\subform open on field ISLot on the main form?
Thanks Jeanette
Your four lines of code will save the data input clerk a lot of grief.
It worked perfectly after I changed ResumeNext to Resume Next.
Sorry about the duplicate questions but my computer said that both postings
failed.
Shadow
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top