value of a txtbox (form) as Criteria of a query?

Sniper-BoOyA-

Registered User.
Local time
Today, 12:31
Joined
Jun 15, 2010
Messages
204
Good Afternoon,

I am having a problem with a graph thats based on a query. It does not respond to the buttons i made.

The idea was:

I have ProctorID 1 and 2, and each ProctorID contains data that eventually will be the source for a graph. I made a form with some subforms (tabs), and on the motherform i made buttons to go to the next ProctorID.

To check if the relationship between the mother/child form was working allright i made a txtbox on the subform, with ProctorID as source. And everything seems to be working allright, but the graph still wont requery, or change according to the ProctorID.

Ive been trying all day to get it to work, and my first thought was to go to the query of the graph, and under proctorID enter the following parameter at the criteria : [Enter your ProctorID]. This solved the problem of the graph not changing, but having to do it manually every time, its just not very userfriendly.

SO i was wondering if i could use the .value of the txtbox i made on the subform, and put that as the criteria if ProctorID in the query?

Cheer!
 
Yes, you can use it as criteria. As it is on a subform, it is sometimes difficult to get just the right syntax that Access wants. So, you might try using this method to get just the right criteria syntax.
 
Oooh thanks m8. That looks promising, ill have a look.

Cheers!
 
Good Morning,

Just wanted to let you know that the link you gave me worked perfect.

I made a textbox on the motherform, gave it the value of ProctorID.

Then i went to the subform, made a label, and linked it to ProctorID of the mother form. I used that syntax as the criteria of my query, and it worked perfectly.

Making Reports of that form was a little bit tricky though, cause it kept on looking for the textbox i made on the form, which caused in the graph being blank.So what i did was make a copy of the query i used for the form, deleted the syntax as the criteria, and simply started the proces from the beginning.

Now its time to do some testing, and if all goes well i can move to the next function i'd like to put in this database.

Anyways, i'd like to thank you for the time and effort.

Cheers!
 

Users who are viewing this thread

Back
Top Bottom