Opening a Form with a Subform in Data Entry Mode

  • Thread starter Thread starter LeLe
  • Start date Start date
L

LeLe

I want a single Form with a subform to be available in both Data Entry as
well as edit mode. I think I know how to use the DoCmd Open form in Data
Entry but I don't understand about the subform. How do I make sure it opens
in Data Entry mode or edit mode as needed?

Thanks
 
Hi LeLe,

You shouldn't need to worry about how the subform opens, as long as you have
the Link Master Field(s) / Link Child Field(s) set correctly. Just worry
about opening your main form in either edit or add new mode, using the
correct optional parameter of the DoCmd.Openform method, ie:

DoCmd.OpenForm "FormName", View:=acFormAdd
versus
DoCmd.OpenForm "FormName", View:=acFormEdit

where FormName is the name of your main form.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
Back
Top