G
Guest
I have a form, which allows the user to select an option which then loads
appropriate information into a data entry form with a new record, into which
the selected value is passed. passing the value to the second form works
fine, and is triggered by a button click event. my problem is closing the
first form, which remains in the background. so far, i've tried putting it
in the following events for form #2: On Open, Before Insert, After Insert -
noe of these work, because the value from being passed (error says that event
refers to object missing). I've also tried putting the statement DoCmd.Close
acForm, Me.Name into the button click event code - that doesn't work either.
this is the code for form #1:
DoCmd.OpenForm stDocName, acNormal
DoCmd.GoToRecord , , acNewRec
Forms![Chart Review Form]!T1_Code = Me.SelectPOS
appropriate information into a data entry form with a new record, into which
the selected value is passed. passing the value to the second form works
fine, and is triggered by a button click event. my problem is closing the
first form, which remains in the background. so far, i've tried putting it
in the following events for form #2: On Open, Before Insert, After Insert -
noe of these work, because the value from being passed (error says that event
refers to object missing). I've also tried putting the statement DoCmd.Close
acForm, Me.Name into the button click event code - that doesn't work either.
this is the code for form #1:
DoCmd.OpenForm stDocName, acNormal
DoCmd.GoToRecord , , acNewRec
Forms![Chart Review Form]!T1_Code = Me.SelectPOS