Form with Multiple Check Boxes to Input Data to Table

Yapdoc

New member
Local time
Tomorrow, 04:07
Joined
Nov 23, 2010
Messages
3
Sorry for this. I'm new to Access and new to this forum. This post is a request for several pieces of help. (It will also likely require you to take a peek at my pathetic db...)

Background: I'm a family physician who is working on a small island in the Western Pacific. The World Health Organization has asked us to implement surveillance on 5 different syndromes. I wanted to use an access database to collect the data. Where I'm stuck is I want to create a form that is fool-proof for our doctors. (i.e. simple and they can only input data). If you could assist, it would be a huge help for our small community here in Yap, Micronesia.

Questions:
1) I want the doctors to be able to simply choose the syndromes (can be more than one) for the patient on the form and then submit. Right now I have code that does submit the data to the table once the related checkbox is clicked, but I'm afraid the doctors might click the check box several times before they have truly submitted, thus causing multiple records. Is possible to make it so the doctor checks the various syndromes for the patient and the record is not updated until the "Submit" button is pressed?

2) I can't seem to get the Visit ID into the visit details table via the form.

Thanks for your help. I realize these might be too large of a problem for this forum, but would really appreciate any input from the experts.

Thanks,
Yapdoc
 

Attachments

First up welcome to the forum.

Before you get too much further into this project, you might want to consider implementing a naming protocol for your DB objects, something along the lines of; FRM_FormName, TBL_TableName, QRY_QueryName etc. and limit your self to alpha and numeric characters and the underscore (_) and avoid embed spaces. All these things will pay dividends once you start writing code. I also noted that you are repeating field names (which is fine when they all refer to the same thing) for example in your Table providers you used First Name and Last Name, and then you used those same names again in the your table patients. This is going to cause you grief very quickly, try ProvFirstName and PtntFirstName in that way there will be no confusion over which table the first name refers to.

Also avoid using table level lookups, given that you are only starting out, I'd remove them ASAP.

The table structure looks pretty good otherwise.

With your visits form I would have the patient and provider details on a main form and then record the various syndromes in a sub form (selected from a combo box, this will give you more flexibility to add additional syndromes) that is linked to the main form via the VisitID.
 
Basicly you should place your insert data code in submit button click event. you could do it like this:

if msgbox("Save data?", vbyesno)=vbyes then
if me!Yourcheckbox1 then
insertdata
end if
if me!youcheckbox2 then
insertdata
end if
.
.
etc
end if

can you explain more about question 2?
 
Wow! Many thanks on the quick replies. Obviously a great community you've got here.

Thanks also for the advice on Access Basics- much appreciated. Most of all, John's approach to the DB is a huge improvement on mine. Thanks- it's much sleeker and still will be easy for our docs to use. Probably would have taken me a 3 months of searches, reading Access InsideOut and utilizing help to get near the DB. Thanks!
-Yapdoc
 
Glad to have been able to help.

Please be aware that the sample I posted is really only a proof of concept, and will need a bit (lot?) of tweaking and polishing before it's ready for general consumption.

Have a play with it and post back with any questions you may have :)
 
Hi John and Others,

I wanted to thank you again for your assistance with the database. I've done some tweaking and am pretty happy with what we've got. (However, I'm sure you could improve upon it even more...) Thanks for the excellent guidance.
 

Attachments

Users who are viewing this thread

Back
Top Bottom