Expected end of statement on error on one line code

G

Guest

I am entering this line on the VB editor for a On button click,
but it gives me an error "expected end of statement" and it highlights the
first OrderNumber . Can someone plese help. thank you

DoCmd.OpenForm "Orders, acNormal,, "OrderNumber = " &
me.OrderNumber,acFormEdit
 
F

fredg

I am entering this line on the VB editor for a On button click,
but it gives me an error "expected end of statement" and it highlights the
first OrderNumber . Can someone plese help. thank you

DoCmd.OpenForm "Orders, acNormal,, "OrderNumber = " &
me.OrderNumber,acFormEdit

You left off a quote: V
DoCmd.OpenForm "Orders", acNormal, , "OrderNumber = " &
me.OrderNumber, acFormEdit
 
K

Ken Snell [MVP]

You're missing a " character after the word Orders.

DoCmd.OpenForm "Orders", acNormal,, "OrderNumber = " &
me.OrderNumber,acFormEdit
 
G

Guest

Thank you, but i am still having a problem, it is not pulling in any info
from the combo box inorder to open the right form, it pops up a value box for
me to fill out. Also when i then do manually enter a OrderNumber, it takes me
to the debugger saying "runtime error 2501" "the open form actiion was
canceled"

thank you
 

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

Similar Threads


Top