S
shoulda
Guest
Hi
I'm trying to pass a value (surname) from a text box control in Form1 to Form2 using OpenArgs.
Form2 displays a list box with the row source being a query based on surname, which is first put into the variable Me.arg3 during Form2's Open_Form event.
List box query looks like this:
SELECT [Visitor's Details Query].visitorID, [Visitor's Details Query].nameLast, [Visitor's Details Query].Name, [Visitor's Details Query].dob, [Visitor's Details Query].company FROM [Visitor's Details Query] WHERE (([Visitor's Details Query].nameLast)=(Me.arg3));
The problem is I keep getting asked for a paramater value when opening Form2 from Form1.
I think the parameter is needed for the list box query because I did a test where I added an unbound text box to the form and set its value to Me.arg3. When I was asked for the paramater request, I typed in something different than the value passed from Form1, and the result showed Me.arg3 in the text box but the list box populated with results based on what I typed in the parameter request box.
How can I get the OpenArgs value to be put into a variable, then query based on that variable to populate the list box?
Help would be hugely appreciated.
Cheers.
I'm trying to pass a value (surname) from a text box control in Form1 to Form2 using OpenArgs.
Form2 displays a list box with the row source being a query based on surname, which is first put into the variable Me.arg3 during Form2's Open_Form event.
List box query looks like this:
SELECT [Visitor's Details Query].visitorID, [Visitor's Details Query].nameLast, [Visitor's Details Query].Name, [Visitor's Details Query].dob, [Visitor's Details Query].company FROM [Visitor's Details Query] WHERE (([Visitor's Details Query].nameLast)=(Me.arg3));
The problem is I keep getting asked for a paramater value when opening Form2 from Form1.
I think the parameter is needed for the list box query because I did a test where I added an unbound text box to the form and set its value to Me.arg3. When I was asked for the paramater request, I typed in something different than the value passed from Form1, and the result showed Me.arg3 in the text box but the list box populated with results based on what I typed in the parameter request box.
How can I get the OpenArgs value to be put into a variable, then query based on that variable to populate the list box?
Help would be hugely appreciated.
Cheers.