Tab Control or Alternative

94Sport5sp

Registered User.
Local time
Today, 01:57
Joined
May 23, 2012
Messages
115
Hi:

For the A2003 mdb that I am working on I would like to display similar information on one form. I believed that tab controls would work but I am having difficulty understanding or setting it up. Essentially I have a table of locations and a second table with details for each location. I would like the first tab(page) of the tab control to load detail data for location 1, second tab(page) of the tab control to load detail data for location 2, etc.

If this is doable, then, how would I set this up? Do I need to create a form for each location and then add that form as a subform (with the appropriate query to select records) to the appropriate tab(page) on the tab control?

General table information:

LocationTbl
LocationId pk autonumber
LocationName text
LastUpdated date

LocationDetailTbl
pk autonumber
fk LocationId
DetailDate date
Quantity Integer
Amount Currency
GroupId fk

There could be up to 30 records per day per location and I would like to use a form to display the data per location with the user selecting a tab(page) to display that days data. The user would need to be able to select which day to display. No edits are to occur. Display only. The number of locations is small, currently 5 location and may grow to a max of 7 locations.

Thanks for your thoughts.
 
That is not the way tab pages work. Each tab page will contain different controls and possibly even subforms. They don't show the same data for different records.

You only need one form for location data. You can use the navigation bar to scroll from record to record and you can also put a combo in the header to use for searching.
 
Hi Pat:

Thanks for the response.

I have created a Master form with a combo box. The combo box allows the user to select location and then load a sub form to display the data for that location. The user will always toggle between all the locations. My thinking is that the user interface would be slicker if instead of going back to the combo box to reselect a location they could just click a tab.

If this cannot be done with "tab controls" is there an alternative?

Thanks
 
You can do this, whether or not it is advisable is another matter. Either have separate queries and subForms for each location. Obviously the more locations the greater number of Tabs and this is where it can become really messy. I have a database with over 1000 locations, tabs would not simply work.

Simon
 
What is wrong with using the navigation bar to move to the next record? It isn't a tab but it is only one click.
 
Hi Simon:

Thanks for the reply. If I understand you correctly, I create one subform for each location. The RecordSource would correspond to the specific location. I would then put each separate subform into its own tab-page. Ok, I can try that.

Hi Pat:

Just to make sure we are on the same wave length. Using the combo box with a subform does work. The user selects a location and then clicks a command button to load up to 30 records of data. And, that works fine. I just thought it would be slick to click a tab/page button to toggle between the records without having to go back to reselect a location and then click command button to reload location data. The record navigation would not, to my understanding, work this way.

Thanks
 
what is the point of having multiple tabs. when you can only see one tab at a time

surely just have one tab, and when you change depot, or whatever, just requery/filter the recordset.
 
Hi Dave:

Thanks for the reply and good point. I tend to find that were users are concerned practicallity does not always meet reality. I will play with your option and Simon's if for no other reason the to improve my rusty skills.

Thanks
 

Users who are viewing this thread

Back
Top Bottom