Error 2501 !!!

A

Ayo

Does anyone know why I am getting a "The OpenForm action was cancelled."
error from this line of code.

DoCmd.OpenForm "frmSiteConfiguration_Input", acNormal, OpenArgs:="GSM850"

it was woking perfectly before then I tried

DoCmd.OpenForm "frmSiteConfiguration_Input", acNormal, OpenArgs:="GSM850"
Me.txtSiteID & "," & Me.txtUMTS_ID & "," & Me.cmbProjectName

and it stop giving the error message, even when I went back to the original
code.
 
T

Tony Toews [MVP]

Ayo said:
DoCmd.OpenForm "frmSiteConfiguration_Input", acNormal, OpenArgs:="GSM850"
Me.txtSiteID & "," & Me.txtUMTS_ID & "," & Me.cmbProjectName

Are you missing an & between "GSM850" and Me.txtSiteID?

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
T

Tony Toews [MVP]

Ayo said:
Does anyone know why I am getting a "The OpenForm action was cancelled."
error from this line of code.

Also this frequently means that there is a problem with the form you
are trying to open.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
A

Ayo

The error is only occuring on that code line and I don't think anything is
wrong with the other form.
 
T

Tony Toews [MVP]

Ayo said:
The error is only occuring on that code line and I don't think anything is
wrong with the other form.

Can you open the other form manually?

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top