Create tabbed form w/different selection criteria

upsman

Registered User.
Local time
Today, 13:29
Joined
Jul 22, 2005
Messages
26
Hi.

I have a table containing student grades. This table contains grades for multiple school years and I use a field called 'SchoolYr' to select the grades for the year I want. I'd like to create one form with multiple tabs representing the different school years. For instance, I'd have tabs for 03-04, 04-05, and 05-06. All the data would be coming from the same table. How would I set up the tabs to get the data from one table but select it based on different criteria for each tab? Hopefully that is somewhat understandable. I know I can use subforms with different Record Sources but I'd have to have a new subform for each year and I'd end up with alot of subforms over a period of time. I'm hoping I can do it with code in the tab somewhere or set the Record Source of each tab somehow.

Appreciate any help you can give.
Rod
 
Hi - Just a few thoughts.

1. Try creating one basic subform and putting a copy on each tab. Use the same Record Source for each but use different filters for each tab to display the dates. Haven't tried it to see if this would work, but seems like it offers some good flexibility and ease of modification.

2. You might also be able to create a text box on each tab and use it to either filter the RecordSource or customize a query to return the right records. Again, this might let you use the same base form.

3. Certainly do-able with VBA code. You can load each each tab when the form loads. There is also an OnChange event so that you can load (or refresh) only when the user changes tabs.

I think that filtering might be the first thing to try. It doesn't really involve multiple subforms, just multiple copies of the same subform.

Post back if you still have questions.

- g
 

Users who are viewing this thread

Back
Top Bottom