Open a Form's Module with VB

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Something simple is eluding me here. In MSA 2003, neither ot these works:

DoCmd.OpenModule "Form_" & strFormName

DoCmd.OpenModule "Form." & strFormName

I'd appreciae the clue, thanks!
 
Hi, Donald.
DoCmd.OpenModule "Form_" & strFormName

You have the correct syntax. Ensure that the form is open before this code
executes, it has a module, and that the name of the form doesn't contain any
illegal characters and isn't a Reserved word. And ensure that Option
Explicit is written in the module's Declarations section, just in case you
have a typo on the form's variable name.

If none of this advice helps, then what is the error message that you're
receiving?

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact info.
 
Back
Top