Tab format forms (main form/subform)

Roni Sutton

Registered User.
Local time
Today, 16:43
Joined
Oct 18, 1999
Messages
68
I have a table that the user wants 'broken up'. They want to display different data on different forms to make it easier to input. I have created a main form using the index card style tabs. On each tab I have put a subform which contains the data they want to see grouped together. How can I make the record displayed be the same regardless of which tab they are on. For example, if they are on tab 1 and do a find on an account number and then go to tab 3, I want the data displayed there to be the record found and vice versa. I am sure this will require VBA code, but I am not sure where to put it.

Thanks, Roni
 
Put an unbound text box on your main form. It can be hidden. In the On Current event for each Form that make up your subforms put code like this:

[Forms]![MainFormName]![UnboundTextBoxName]= Me![UniqueRecordID]

Now be sure that the Master and Child links of the subforms are linked to the unbound text box and all should work.
 
Do you need to use subforms? If you only want to see part of a record on a given tab, just put those controls on it. Your record source would be the same for every tab since they are really just part of the same form.
 
Well, sometimes, I feel like I have so missed the obvious that it's ridiculous. You are correct, sir. This will work wonderfully.

Thanks, Roni
 

Users who are viewing this thread

Back
Top Bottom