View Full Version : Tab format forms (main form/subform)


Roni Sutton
12-01-2000, 04:02 AM
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

Jack Cowley
12-01-2000, 08:09 AM
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.

Neal
12-03-2000, 08:04 AM
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.

Roni Sutton
12-04-2000, 03:24 AM
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