Jerry,
Excuse this for being a little off topic to your question but your table structure is a bit un-normalized. You have data values (Math, Science,...) in your field names. What happens when you need accommodations for other subjects? Your current table structure suggests you will need to add fields and controls as well as modify expressions etc.
A better solution might use a junction table to store each accommodation as a separate, related record.
Duane Hookom MVP
MS Access
----------------------------------------
> From: JohnV@msn.com
>
> Jerry-
>
> You don't need to add a field to your table. Use a query as the Record Source for any Form or Report the user sees and generate a field:
>
> Flagged: [MathAccomodations] Or [ScienceAccomodations] Or [SocialStudiesAccomodations] Or [ReadingAccomodations]
>
> Display the generated Flagged field on your Form or Report to inform the teachers.
>
> John Viescas, Author
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Jerry Mathers
>
> There are fields for four different subjects. Here are the fields I need to check:
>
> MathAccommodations {Yes/No data type}
> ScienceAccommodations {Yes/No data type} SocialStudiesAccommodations {Yes/No data type} ReadingAccommodations {Yes/No data type}
>
> These fields determine if a student has any accommodations that need to be applied during testing or other similar types of classroom activities that require the use of these accommodations.
>
> If any, or all of the four fields are True I want to set Flagged to True since the Flagged field is the one being displayed for the teachers so they know to look into what the specific accommodations are for any flagged students.
>
> Jerry
>
>
> ________________________________
> From: John Viescas <JohnV@msn.com>
>
> Jerry-
>
> If you can state what you're looking for as Conditions in a query, you can do it it one fell swoop with an Update query.
>
> UPDATE MyTable
> SET Flagged = True
> WHERE (FldA Like "*something*") or ....
>
> Spell out the conditions you're looking for, and I'll help you write the SQL.
>
> John Viescas, Author
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Jerry Mathers
>
> I'm stuck on a problem that requires me to cycle through each record in a table looking for certain conditions in specific fields. If I find one of these conditions I need to flag that record (I will probably just put a check in a Yes/No field called Flagged).
>
> The part I cannot figure out is how to cycle through all of the records in a table until I run out of them.
>
> Obviously it to be something like this:
>
> Step 1 Start with the first record
> Step 2 Look for the conditions and turn on Flagged when true Step 3 Move to the next record Step 4 Look for the conditions and turn on Flagged when true Step 5 Repeat Steps 3 & 4 until there are no more records
>
> It is Steps 1, 3 & 5 that are my problem. Can you point me in the right direction; maybe a bit of sample code or a website where I might find out how to do this?
>
> Thanks for any help you can provide.
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MS_Access_Professionals/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/MS_Access_Professionals/join
(Yahoo! ID required)
<*> To change settings via email:
MS_Access_Professionals-digest@yahoogroups.com
MS_Access_Professionals-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
MS_Access_Professionals-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Tidak ada komentar:
Posting Komentar