Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refer to form syntax 1

Status
Not open for further replies.

TimTDP

Technical User
Feb 15, 2004
373
ZA
I have the following code:

dim strFormName as string
strFormName = "frmTest"


I now want to refer to the form in a module. The code should look something like this:

Forms!strFormName.cmdOutputReport.Caption = "Design"

The syntax is incorrect! What should it be?

Thanks
 
Two things to try:

[tt]Forms(strFormName).cmdOutputReport.Caption = "Design"[/tt]

and - for future Access form questions, try the Access forms forum (forum702) ;-)

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top