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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error with VBA code 1

Status
Not open for further replies.

Superguppie

Technical User
Jan 19, 2005
107
NL
Hi all,

i have the following problem. when i add this code to VBA:

docmd.OpenForm(frmOplossing,,,="[Ticketnummer]=" & [Ticketnummer],,acDialog)

VBA will give the following Error (hope i did translate it well???)

Expecting expression

What is wrong about this code??

Greetz
Superguppie
 
How are ya Superguppie . . .

Remove the 1st [blue]=[/blue] . . .


Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Superguppie . . .

DoCmd.OpenForm is a [blue]Method[/blue] not a function! Remove parenthese [blue]()[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
ok, when i type docmd.openform it gives me automaticly an example how to use the Method, and in the example there was () but i know it now:D

Thanks for the info its solved now
 
Superguppie . . .

Your seeing whats called [blue]Auto List Members[/blue] (arguement definitions as a hint of what to do) and is not an explicit syntactical representation. For the actual syntax, always view it in help (put the cursor on a keyword like [blue]OpenForm[/blue] and hit [blue]F1[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top