Adding multiple records onto a connected table...

kyuball

Registered User.
Local time
Today, 07:55
Joined
Jul 6, 2009
Messages
66
I'm not sure if I worded the title accurately as I am having a hard time trying to describe what I trying to do (maybe that's the problem?)...

I have an .mdb database that stores information regarding clients in a supportive services program for the homeless. They come to us as Single Adult, Adult in Family, or Child in Family (field name: familytype in the table that keeps track of clients). When a Single Adult gets added, adjusting their data is a pretty straightfoward thing so no problems there. Where I am having problems is with people in families.

One of the quirky things about Adult in Family is that they come with children and sometimes even other adult family members. The program doesn't actually serve children but have to list children as distinct and countable clients because they come attached to the adult in family as a family unit. We are required to keep track of the number of family units, as well.

So the way I did it was to have a separate table called "familyname" that gives a family unit a distinct PKid and a table called "family" that links clients in families to a familyname/ unit. When a case manager wants to look at lists/ profiles of certain families, he/she goes to a form that lists the family names (frmfamilyunitslist) and clicks a button that opens another form that lists clients that are in that family unit (frmfamilymemberslist).

We are funded by HUD and they keep track of clients based on when they enter the program and exit the program. Obviously, every client that is listed has entered the program so the date of entry is a field on the regular client table ("entrydate".) However, since not everyone exits, I have a separate table that has a field that links the client (field: "exitclient") to a PKid incidence of exit and exit date ("exitdate".)

Since it is assumed that a family unit enters and exits a program together (a family that stays together... you get the drift), all the clients in a family unit have to have identical entry and exit dates. I got the entry dates to match up for families, so that's not a problem. What I wanted to do was to insert a command button on the form that lists the members of a certain family (frmffamilymemberslist) that, when pressed, will open another form that will allow a case manager to enter an exit date that will then create exit incidences for all the members of a family at once with matching exit dates....

Is there a code for this? Was my explanation too confusing?
 
Since it is assumed that a family unit enters and exits a program together (a family that stays together... you get the drift), all the clients in a family unit have to have identical entry and exit dates. I got the entry dates to match up for families, so that's not a problem. What I wanted to do was to insert a command button on the form that lists the members of a certain family (frmffamilymemberslist) that, when pressed, will open another form that will allow a case manager to enter an exit date that will then create exit incidences for all the members of a family at once with matching exit dates....

why not have your tblFamilies have an enter and exit date, so the form which alreayd exists to select a family will also have controls to enter the enter/exit dates?

that is:

tblFamilies
----------
FamilyID (PK, Autnumber)
FamilyName (Text)
EnterDate (Date)
ExitDate (Date)

if the data are added as the families come in (real-time), then you can even set your EnterDate to default to the current date (in Default value, put "Date()") and the ExitDate can have a button associated it which automatically inputs the Current Date into the ExitDate field when pressed.

that is:
http://www.access-programmers.co.uk/forums/showthread.php?t=178695&highlight=button+today%27s+date
 
Hey Wik,

Thank you for your answer. I have thought about doing it that way but the problem is that clients in families have to be counted as unique clients as well as members of family units (I know... but what do you expect from the federal government?) The family unit as a singular entity is not necessarily counted when exited (only when they enter... I know.. kinda screwy.) What is counted is their exit as unique clients. However, since they were joined as family at entry, they have to exit together, as well...

At this point, what I really need is a way to make a set of unique exit incidences (PKexitid on the exit table) for multiple clients at once. Basically, the form "frmfamilymemberslist" filters a set of unique clients that have been joined through the family table and lists a set of them that have the same familyid. I was hoping to get some code for a command that would just exit everyone on that list at once (e.g. for Single Adults, I just have a form that creates an exit record, but that is one record for one client and pretty easy to get at...) by creating a whole bunch of unique PKexitids for each client with identical exit dates int he exit date field.

I have tried Microsoft Access Help and these forums to get my head wrapped around this DAO Recordset thingy that seems to hold the key to my problems, but cannot make heads or tails of it (I'm a pretty stupid dude...) I was hoping someone would be able to give me at least some hints as to how to approach this...
 
you could try SQL and INSERT INTO statements.

but right now i'm worried about your current table structure. is this a database that is pre-deployment and you can tweak, or is this a system already in place and you're trying to bolt bandaids onto it?

if you could: go to the relashionships window, and screenshot it for me. i want to see what tables you have, what fields they have for data, and how each table relates to each other table. i have a feeling some can be merged and will make life easier for you... but i'll need to see that relationships window... (edit: if you can't make too many changes, the relationships will guide us in how to best manage the situation)
 
(I'm a pretty stupid dude...) I was hoping someone would be able to give me at least some hints as to how to approach this...

i doubt very much if that were true. we'll sort it out, don't worry mate :)
 

Users who are viewing this thread

Back
Top Bottom