You can make a button using the wizard to open a form which is probably the
easiest way of generating the button. If you do that you will see similar
code as below with the exception of the DoCmd.Close line which will close
your mother form for you after opening the child form.
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "YourChildFormName"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord acForm, "YourChildFormName", acNewRec 'you may need to
do something about which record to display
DoCmd.Close acForm, "YourMotherFormName", acSaveYes 'Save can be removed
if not required
I have seperated the lines because of text wrapping
hth Let me know how you get on?
Mike B
--
An Engineers Prayer:
At the very end of the day,
when all else fails,
you have tried all,
you have shouted at and blamed the innocent,
and asked everyone you know,
READ THE INSTRUCTION MANUAL.