OK, here's my dilemma. I am trying to create a system to track cases
and clients. There are instances when cases have multiple clients, and
there are instances where clients have multiple cases. I have several
tables to house all the information, but the three that connect the
dots are
tblClients
tblCases
tblCaseClients
tblCaseClients contains CaseClientID (primary Index), ClientID, CaseID
I have the following forms: frmCaseTabs whose recordsource is tblCases
frmClients whose recordsource is tblClients
frmCaseClients whose recordsource is tblCaseClients, and it appears as
a subform on both the frmCaseTabs and frmClients
I am having trouble creating a screen on the frmCaseTabs where I can
add an new client to an existing case, because the subform showing the
clients is filtered, therefore I cannot add another one. I know I can
accomplish this somehow, but my brain is fried right now and I can't
come up with the solution. Any help would be greatly appreciated.
Thanks,
Dave 3 1667
Have a command button on the main form that inserts a new client. I
suggest in that case you develop a small dialog box to choose one. Or,
display an otherwise hidden combobox, again on the main form.
When the new client is inserted, you can issue Me.Recalc (does a Requery
on listboxes, comboboxes and subforms) db******@yahoo.com wrote: OK, here's my dilemma. I am trying to create a system to track cases and clients. There are instances when cases have multiple clients, and there are instances where clients have multiple cases. I have several tables to house all the information, but the three that connect the dots are
tblClients tblCases tblCaseClients
tblCaseClients contains CaseClientID (primary Index), ClientID, CaseID
I have the following forms: frmCaseTabs whose recordsource is tblCases frmClients whose recordsource is tblClients frmCaseClients whose recordsource is tblCaseClients, and it appears as a subform on both the frmCaseTabs and frmClients
I am having trouble creating a screen on the frmCaseTabs where I can add an new client to an existing case, because the subform showing the clients is filtered, therefore I cannot add another one. I know I can accomplish this somehow, but my brain is fried right now and I can't come up with the solution. Any help would be greatly appreciated.
Thanks, Dave
--
Bas Cost Budde, Holland http://www.heuveltop.nl/BasCB/msac_index.html
For human replies, replace the queue with a tea
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. The first tab contains the case
information, the second tab contains a subform showing the clients on
that case (obviously filtered). The way I have it working currently is
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.
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. It would have to set the CaseID in tblCaseClients, and it would
have to set the ClientID to whatever the new ClientID is when the new
person is created. It sounds so confusing, but I know it's quite
simple, but I just can't figure it out.
Thanks,
Dave 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.
That is not automatically. You can make a button any way you like. But
it is probably not the best place, indeed.
The first tab contains the case information, the second tab contains a subform showing the clients on that case (obviously filtered).
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 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.
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.
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.
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ian Davies |
last post by:
Hello all
I have the following PHP script to place records from my MySql db into a
table. However I now wish users to beable to select the multiple records
from the table and on clicking a button...
|
by: origin197511 |
last post by:
Hello all...
I'm having an issue with MSAccess 2000. I have a Form that holds
records of my cartridge loads for a rifle and a subform that lists all
groups that have been fired with that load. ...
|
by: Zeljko |
last post by:
I'm creating Address book.
Header of the main form (frmAddress) contains combo box (cboFilter) to
filter records by Occupation on main Form(Ocupation1). That's working. Combo
box also have "Show...
|
by: melnhed |
last post by:
---Report the current filtered records from a Form---
Hello All,
I've seen this topic discussed before, but the solution described then
doesn't work in my particular case.
My Config: ...
|
by: paulcrowsnest |
last post by:
I have a master form (clients), and 2 subforms (invoice and credit account details). This all works great.
ive added a command button in the master form (clients) to open a new form as a popup where...
| |
by: Ironr4ge |
last post by:
Hi everyone,
By the rate its going it want be long till I start growing gray
hair... but anyway..
to come to the point...
I am trying to open the form "Languages" with a diffrent record...
|
by: Ironr4ge |
last post by:
Hi everyone,
I am trying to open the form "Languages" with a diffrent record
source
to the "Contacts" form where I conducted the search or filter... .
I was wondering whether there was a vba...
|
by: Nettle |
last post by:
Purpose: I am creating a mailing distribution list database. Users should be able to filter/search contacts and add them to distribution lists they have created.
My problem? I can't add multiple,...
|
by: jinalpatel |
last post by:
I am using following code for searching records.
'Purpose: Build up the criteria string form the non-blank search boxes, and apply to the form's Filter.
'Notes: 1. We tack " AND " on...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |