List Box with Tabs

  • Thread starter Thread starter jtertin
  • Start date Start date
J

jtertin

I have a form with two tabs on it (one control, 2 tabs). I have a list
box on the first tab that is populated by a database query that shows
all "serial numbers" of units. After clicking on a serial number, the
second tab is supposed to display the data specific to that serial
number.

My question: How can I link the two? When a serial number is
highlighted, the data shown on the second tab does not reflect the same
record. How can I carry over the "index" or "record ID" that is
associated with the selected serial number from the first tab over to
the second tab?

Thanks for any help!
 
What is on the 2nd TabPage of the TabControl? A subform?

If it is a Subform, I think you can "link" (I guess you meant refreshing
data on the Subform depending on the selection in the ListBox on the 1st
TabPage) in a number of different way.

1. Use the ListBox_AfterUpdate to requery the Subform.

2. Use the ListBox (I guess you have a single-select ListBox, not a
multi-select ListBox) as the LinkMasterFields for the SubformControl.

3. Use the TabControl_Change Event to check whether the TabPage 2 (Index is
1) is the active Page and if it is requery the Subform. Basically, this is
the just-in-time method: the requery action is done just before the user can
see the data on the TabPage 2.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top