By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,225 Members | 1,434 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,225 IT Pros & Developers. It's quick & easy.

DoCmd.OpenForm Error

P: 7
I am trying to open records from another form. In my combo box under row source I have:

SELECT QryMaint41M.Workordernum FROM QryMaint41M ORDER BY [Workordernum];

Then under After Update is:

Private Sub Combo24_AfterUpdate()
DoCmd.OpenForm "FrmMaintWO", , , "Workordernum = " & Me.Combo24


End Sub

When I choose a record the "Enter Parameter Value" box pops up with the value I selected showing. When I enter the value, it goes to the record, but if I just hit enter the form shows blank.

What am I missing? I know theres away to go straight to the record.

Any suggestions appreciated!!
Jan 24 '08 #1
Share this Question
Share on Google+
3 Replies


missinglinq
Expert 2.5K+
P: 3,532
Despite the name Workordernum is it possible that this field is not numeric but rather text? If so,

DoCmd.OpenForm "FrmMaintWO", , , "Workordernum = '" & Me.Combo24 & "'"

would be the correct syntax.

Welcome to TheScripts!

Linq ;0)>
Jan 25 '08 #2

P: 7
That worked!!! Thank You
Jan 25 '08 #3

missinglinq
Expert 2.5K+
P: 3,532
Glad we could help!

Linq ;0)>
Jan 25 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.