Parametre query

Celtic Queen

Registered User.
Local time
Today, 22:44
Joined
Feb 26, 2003
Messages
29
Hiya
I have a parametre query in Access which pops up a messge that asks the user to type in criteria to look up details in a new form.
What I want is for,instead of the user having to type the criteria in a pop-up window,for the parametre query to look up whats written in a field on another form,say the form the user is on just before the parametre query is used
 
Criteria:

[Forms]![frmWhateverForm]![txtWhateverControl]
 
When I try it I get a message that says 'Enter Parametre Value' and underneath it says 'Forms!frmWhateverForm!txtWhateverControl
 
Did you copy what I'd written litarally? If so, the Whatever parts were for you to put your own form and control in.

Also, the form needs to be open when referencing a value from it in a query.
 
Oh,the form will be open,its from here where the criteria is written.
Do u know how 2 get rid of that weird message?
 
What is your exact criteria? Cut and paste it here, please.
 
Here it is:
[Forms]![Publishers]![PublisherIDNumber]

Oh by the way I checked out u're site - its cool!
It'll be excellent when its finished!
 
Celtic Queen said:
It'll be excellent when its finished!

Thanks, but I'm thinking of deleting it altogether and putting up something better in its place.

Here it is:
[Forms]![Publishers]![PublisherIDNumber]

If your form is called Publishers and the control you are referencing is called PublisherIDNumber, and the form is open, then I can see know reason why the criteria won't work in your query.

The only other thing I can think of is that PublisherIDNumber is the name of the field in your table, but not the name of the control on the form.
 
Or, possibly, a simple spelling mistake.
 
Ohmygosh IT WORKS!!! AW,I CUD KISS U!!!!!!
Just one more question,how do I open up a form using this query?
 
Celtic Queen said:
AW,I CUD KISS U!!!!!!

Beer is more favourable. :p

Just one more question,how do I open up a form using this query?

I'm not too clear on this bit:

Do you:

a) Want to bind this query to a form so that it opens as its RecordSource?

b) Want to open a form in code?

c) Both a and b? :cool:
 
Beer it is then!

I created a form out of the query and want it to open this form,when run,with the criteria (publisher ID number) from the last field matching the publisher ID in the publisher ID section of this form
 
Effectively, if this form is bound to the query then when you open the form, the other form that the query works from will have to be open.
 
I was just kidding, I know its Mile-o-phile (lol)
NEWay,I checked ure profile n u were born in 79,so that makes u either 23 or 24.Nice

Oh,by the way,do u know what to do with ure syntax when the original form is a child on another form? (the form where the criteria comes from?)
 
Right ppls, what do u do with the parametre query syntax [Forms]![Publishers]![PublisherIDNumber] when you want the publisher ID number to be looked up from 3 or 4 different fields on one table?
 
Mile,what do u write in the query criteria when u want the information from the first field (the criteria that decides what happens in the second field) to be from a child form (all the stuff you sent me is about Visual Basic,not query criteria)
 

Users who are viewing this thread

Back
Top Bottom