[color=blue]
> The main form is called frmCaseTabs, it's recordsource is the tblCases
> table. If I add a button to add a new record, it will be a new Case
> record, not a new Client record.[/color]
That is not automatically. You can make a button any way you like. But
it is probably not the best place, indeed.
[color=blue]
> The first tab contains the case
> information, the second tab contains a subform showing the clients on
> that case (obviously filtered).[/color]
That would be the logical place for the 'add client' button. I
understand you add an existing client to this case, on that particular spot?
The way I have it working currently is[color=blue]
> that you can open the frmClients and add people, then you close that
> form and open the frmCaseTabs form where you fill out the case
> information, and choose the clients from a drop down list of all
> clients in the database. This updates the table tblCaseClients with
> the CaseID and ClientID and creates a primary index called
> CaseClientID. So my problem is that because I have this intermediary
> table between the tblCases and tblClients, I can't figure out how to
> add a client from within the frmCaseTabs screen. The recordsource is
> not the table tblCaseClients. The subform containing that information
> is on the second tab, and it's recordsource is qryCaseClients which
> shows all clients under this case number.[/color]
Is that query not updatable, then? And why do you use a query at all?
Provided you have LinkMasterFields and LinkChildFields correctly set up,
you will automatically see just the clients for this case.
[color=blue]
> If I am going to add a new client from this screen, I really need to
> set it to populate the tblCaseClients table as well as the tblClients
> table.[/color]
You would choose the client from a combobox based upon tblClients. Set
its LimitToList property to Yes (or True or what is it), and use the
NotInList event to trigger the complete new client insertion procedure.
At the end of this event procedure, do Response=acDataErrAdded.
If NotInList doesn't fire, it means the user selected an existing client
to be added to this case.
Both ways, the client gets added to the case.
Maybe it's just qryCaseClients that frustrates function here.
--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
For human replies, replace the queue with a tea