Different tabs/different tables..? Please help

P

Prince

If I have 2 tabs on a form, how do I get each tab to have different
information from different tables. Example: I'm creating a databade where the
first tab is general client information and the second tab is important dates
to remember for each client. How would you go about designing it or
programming it so I can haver the form open and view 1 clients general
information and click on their important dates and then switch clients and
view their general information and important dates?
 
P

Prince

I've added separate subforms on each tab, but now when I open my form the
first tab will contain Client #1's information, as will the second tab. If I
switch to the next record on the first tab to go to Client #2's information,
the first tab will contain Client #2's information as it should, but the
second tab still contains Client #1's information. It wants me to go to the
second tab and change that to the next record, too. Instead, I would like to
click next record and have the information under every tab change to that
specific client's information. How do I go about doing that?
 
T

tina

if the main form is unbound, suggest you bind the client table to it, and
dump the subform on the first tab. just put the controls for the main form
directly on that tab. then you can easily link the main form to the subform
on the second tab, using the subform control's LinkChildFields and
LinkMasterFields properties.

if, however, the main form is already bound, so that you do need to use a
subform for the client table, you can link the first subform to the second
subform: add an unbound textbox control to the main form, i'll call it
txtClient. set its' ControlSource property to

=[NameOfFirstSubformControl].[Form].[PrimaryKeyField]

make sure that you're using the name of the primary key field from the
client table, and that that field is included in the subform's RecordSource.
also, make sure you're using the name of the subform *control*, which may be
different from the name of the subform object. to get the right name, go to
http://home.att.net/~california.db/instructions.html and click the
SubformControlName link to see illustrated instructions.

still in the main form's Design view, click on the second subform control,
and set its' LinkChildFields property to the name of the foreign key field
that links the table to the client table. set its' LinkMasterFields property
to the name of the unbound textbox control on the main form, as

[txtClient]

now when you navigate from one client to the next in the first subform, the
second subform's records should be synchronized correctly.

hth
 

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

Top