Subform Issue

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Everyone,

I'm calling a form from a form and passing the value of Route to limit the
inputs to the next form which is bound to a table with the key RouteX:

MsgBox (Me.Route)
DoCmd.OpenForm "VansIII", , , "[RouteX]=" & Me.Route

The Msgbox shows the correct value, but I keep getting a Parameter box
popping up asking for the value of "LIM" or "DUB", which is the value of
Me.Route.

I'm a very confudes lad, been over this 50x with no change.
Can anyone please help.

Thanks in Advance,
Pat.
 
If the value is "LIM", then RouteX must be a Text field.

You need additional quotes:
DoCmd.OpenForm "VansIII", , , "[RouteX] = """ & Me.Route & """"

For an explanation of the quotes, see:
Quotation marks within quotes
at:
http://allenbrowne.com/casu-17.html
 

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

Back
Top