Passing Parameters from Form to Queries

psugak

Registered User.
Local time
Today, 01:40
Joined
Mar 20, 2006
Messages
16
Good Afternoon,

I am trying to create a form where a user will enter in a value into a text field. Afterwards, when the user clicks "Enter", a query will run and will LOOK FOR THE VALUE THAT WAS ENTERED INTO THE TEXT FIELD. i.e.
User enters their address into the field and clicks the enter button.
Afterwards, a query will run like
select * from customers where address = @address <== the value the user entered into the text field. This is where the mystery lies. How do you pass values?????

Thanks,
Nervous Jervous
 
to do this in your Query Enter the following into the Criteria field:

Forms![Form Name]![Control Name]

Then When you run the Query as long as the Form is open it will pick up the entry from your text box.
 
Yes, that worked only for the regular queries. Does not work for append queries, especially since the tables are linked to sql server 2000. :*(
 
Same sort of thing

I want to do the Same sort of thing, but I want the form to initially hold a number (which I am going to pass to the query).

When I put the number into the Form_Open procedure, it asks me for "Forms!frmCustomType!TypeNo" which the field I put into the query. I thought I had already given that field to the computer!



What gives?? perplexed

TIA
Marty
 
Marty, no one is replying because they are not smart enough, not one access guru in here i guess.....
 
psugak said:
Marty, no one is replying because they are not smart enough, not one access guru in here i guess.....

Way to butter up the nice people here who give their time and expertise for FREE.
 
Append queries or Select queries, the concept is pretty much the same.

So... someone thinks making a forms!controls referefence won't work? What is the symptom?

Oh, BTW, don't worry about "not having an Access Guru" in the room. Since we all volunteer our time for free, we get to choose our schedules at will. (You get what you pay for....) But many really good Access folks check in on at least a semi-regular basis.
 

Users who are viewing this thread

Back
Top Bottom