Entry on one form auto to another

  • Thread starter Thread starter Greta
  • Start date Start date
G

Greta

Access 2002...
I have a very complex group of forms and tables to track
machine testing.
When data entry is entering, if "FAILED" is entered, it
switches them to a 2nd form that is completed before they
can return to the main form and continue.
What I want now is the autonumber ID on the main form to
automatically show on the 2nd form when they get into it.
Am I crazy? There is a way to do this, isn't there?
Thanks,
Greta
 
Greta said:
Access 2002...
I have a very complex group of forms and tables to track
machine testing.
When data entry is entering, if "FAILED" is entered, it
switches them to a 2nd form that is completed before they
can return to the main form and continue.
What I want now is the autonumber ID on the main form to
automatically show on the 2nd form when they get into it.
Am I crazy? There is a way to do this, isn't there?

If the second form is *always* called from the first you can just set the default
value property of the ID control on the second form to something like...
Forms!NameOfFirstForm![ID]

If you sometimes use the second form when the first is not open, then you can use
code like this instead...
DoCmd.OpenForm "SecondFormName",,,,,acDialog, Me![ID]

Then in the OpenEvent of the second form...
If IsNull(Me.OpenArgs) = False Then Me![ID].DefaultValue = Me.OpenArgs
 
Back
Top