Jumat, 03 Agustus 2012

Re: [MS_AccessPros] A Query Problem

 

I have actually solved this little problem.  It doesn't resolve the reason it didn't originally work, but I'm happy with how it is working now.

However, I do have another question...

There is a Form where teachers will select all of the items they want to see on a report for the kids in their class.  On this Form there are check boxes related to different testing accommodations/adjustments a student can receive.  These are broken down by subject (Reading, Math, Science, etc.) since the accommodations allowed any student could vary depending on the subject.  An accommodation might be extra time to take a test, use of a dictionary or calculator, etc.  These are arranged in columns by subject.  Right now each individual accommodation is just a separate yes/no field that is named for human purposes with the subject and accommodation. For example, there is MathCalculator, MathExtraTime, ReadingExtraTime, ScienceDictionary, etc.

Having arranged it this way, we discovered that we would like to be able to group the Report results by subject, but I don't think I built in any way to be able to do this.  I, a human, knows the field called MathCalculator is under the subject of Math, but Access doesn't.  I need to find a way to create grouping by subject and I cannot think of any way to do it on a Report based on a Query (which is based on which fields are selected on the Form).  Do you have any suggestions about this?

Dan

________________________________
From: Duane Hookom <duanehookom@hotmail.com>
To: Access Professionals Yahoo Group <ms_access_professionals@yahoogroups.com>
Sent: Tuesday, July 31, 2012 12:07 PM
Subject: RE: [MS_AccessPros] A Query Problem


Dan,
Feel free to share "some code that takes ..." and the SQL of "this Query to show the results".

Most of us veterans build a WHERE CONDITION to use when opening forms and/or reports.

Duane Hookom
MS Access MVP

----------------------------------------
> To: MS_Access_Professionals@yahoogroups.com
> From: amessyguy@yahoo.com
> Date: Tue, 31 Jul 2012 09:02:36 -0700
> Subject: [MS_AccessPros] A Query Problem
>
> 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]
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
                       

------------------------------------

Yahoo! Groups Links

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar