Viewing specific data in a tab control

Laura

New member
Local time
Today, 10:22
Joined
Jun 15, 2000
Messages
8
I have decided to use tab controls, as my forms were getting complicated. However I am not use to using them and am having a couple of problems.

On page1 I have a search page which uses a query to list all the customers within a list box. From here, previously, I have use a command button to open a related form, after highlighting a particular record the command button linked customerID in both forms to display the correct record.

However, in the tab controls, all that happens in my related pages is the diplaying of the first customer in my customer table, no matter what I choose in my list box.

i think I probably need some code to link the customerID in the list box of page1 with the customerIDs in the other pages of my tab control.

Would this be under an event such as 'On Open' and how would I specify this link criteria?
 
When you create a listbox (NameOfListBoxHere), you have to specify which column is bound. You probably have it set for CustomerID. To open the form (NameOfFormHere), your best bet is to double-click on the customer in the listbox and set the On Dbl Click property to:

DoCmd.OpenForm "NameOfFormHere",,,"[CustomerID] = " & NameOfListBoxHere

The first click identifies the proper customer record (CustomerID) and the second opens the form with the filtered command above.
You can do this with each listbox in your tab controls by changing the name of NameOfListBoxHere.
 

Users who are viewing this thread

Back
Top Bottom