I'm helping (a relative term) a friend with a problem passing more than one value to a Query. We want to view student records either by Grade or by Teacher.
I have some code that takes the selected grade from a ComboBox on a "selection Form" and passes it to the Query where the criteria for the GradeLevel field is Grade(). It works perfectly.
I basically duplicated the Grade code, changing things where necessary, except this time for the teacher name. It is on a separate "selection Form" that takes the name entered into a TextBox and passes it along to the Query where the criteria for the Teacher field is TName().
There is a Form based on this Query to show the results. It is supposed to open up having filtered records based on either of the selected criteria. Everything works just fine--if I only have one criteria in my Query. If I try to add the second criteria to the Query only the one in the left most position will actually work.
As it is Grade comes before Teacher in the Query. If I put the Grade() criteria in the first box (the AND box?) and the TName() criteria in the OR box below Teacher only the Grade comes through. In order to get the TName() criteria to work I have to remove the Grade() criteria. Can you help me so I can get both of the criteria to play well together--in the same Query.
Hope this makes sense. As always--thanks!!!
Dan
[Non-text portions of this message have been removed]
Selasa, 31 Juli 2012
[MS_AccessPros] A Query Problem
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar