multi records in one form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table called "Lab_Results" which has fields LabID (autonumber,
primary key), SSN (text), Date (date/time), LabType (text), and LabValue
(numeric)

I tried to set my form up so that the SSN and Date were at the top and would
be used for all "labtype" and "labvalue" values entered in teh form. i would
like to repeat "labvalue" several times throughout hte form and for each one
have the "LabType" predefined in code. so the lab type would be Sodium,
potassium, calcium, etc all listed under each other so it is easy go down the
form filling in teh information taht is given to me by the lab. this will
allow me to have all of my lab results in one table as seperate records, but
enter them in one form.

could someone help me with the code needed to set up this form.

thank you very much,
russ
 
your table does not follow data normalization rules. suggest three tables:

tblLabTypes
TypeID (primary key)
TypeName

tblLabResults
ResultID (primary key, autonumber)
SSN
ResultDate (shouldn't use "Date" as a field name, as it is a Reserved word
in Access)

tblLabResultDetails
DetailID (pk, autonumber)
ResultID (foreign key from tblLabResults)
TypeID (fk from tblLabTypes)
LabValue

relationships:
tblLabResults 1:n tblLabResultDetails
tblLabTypes 1:n tblLabResultDetails

standard data entry setup for the above structure is: main form bound to
tblLabResults. subform bound to tblLabResultDetails. mainform/childform
linked on ResultID fields in LinkChildFields and LinkMasterFields
properties. subform has a combo box control, bound to field TypeID. combobox
RowSource is based on tblLabTypes.

to enter data: open the main form. enter the SSN and date once for each set
of results. in the subform, enter the values for each lab type (one record
per lab type). with a little coding, you can set up the form/subform so that
when a new record is entered in the main form, all the subform records for
the lab types are automatically created - so the user can just run down the
list and enter the values. i have a demo db that illustrates how to set that
up, let me know if you want to see it.

hth
 
Tina,
thank you for the help and suggestions. could i see the demo db that
illistrates how to set this up please. i am fairly new at access so seeing it
is the best way for me.

thank you,
russ
 
yes. the db is in A2000, so if you need it in A97, let me know. also, i plan
to zip it with WinZip, so if you don't have anything to unzip it at your
end, let me know.

post your email address. be sure to disguise it to avoid getting spammed to
death. throw in capital letters, spaces, whatever - just make sure you tell
me how to "un-disguise" it so i can send the demo db to you.
 
tina,
thank you.
my email address is (e-mail address removed)

please add a 9 after the "14" in the email and all of the letters should be
lowercase. i have office 2003 and alladin software to unzip the file. thank
you very much for your help.
russ
 
you're welcome, email sent.


Russ said:
tina,
thank you.
my email address is (e-mail address removed)

please add a 9 after the "14" in the email and all of the letters should be
lowercase. i have office 2003 and alladin software to unzip the file. thank
you very much for your help.
russ
 
tina,
i never got the email. did you put a 9 after the rooster14 in the email?

thank you,
russ
 
yes, i sent it to rooster and then 149 with no spaces, etc, between, to
hotmail. it's in my Sent mail folder, and i didn't get a delivery error
message.
 
tina,
the email never came through. do you think you could re-send it.

thank you very much,
russ
 
sent. make sure you check your Junk E-mail folder, and/or a Spam folder,
and/or a Bulk Mail folder in case your email program is not putting it in
your Inbox.
 
Back
Top