Creating matching record in new form

J

JCA

My database is essentially a set of data entry forms (for a clinical trial).
When a button at the bottom of each form is clicked, the next appropriate
form in the sequence will open. I have things set up so that the next form
opens at the appropriate record (i.e. the record with the Participant ID
value the same as the Participant ID value in the record just completed in
the previous form) if this record exists, but the fundamental thing which I
can’t work out how to do is to create this record (i.e. a new record with the
appropriate Participant ID) if it does not already exist. Can you help?
 
J

John W. Vinson

My database is essentially a set of data entry forms (for a clinical trial).
When a button at the bottom of each form is clicked, the next appropriate
form in the sequence will open. I have things set up so that the next form
opens at the appropriate record (i.e. the record with the Participant ID
value the same as the Participant ID value in the record just completed in
the previous form) if this record exists, but the fundamental thing which I
can’t work out how to do is to create this record (i.e. a new record with the
appropriate Participant ID) if it does not already exist. Can you help?

Erm.

It sounds like you've made a very common error: starting your database design
with Forms, probably based on paper data collection forms.

This is pretty much a solid guarantee that you will have an improperly
normalized set of tables! It's a bit like building a house, with the walls,
windows, soffits and all... and then starting to think about where the
foundation should be poured.

What is your underlying Table structure? How (if at all) are the tables
related? Normally (with properly structured tables) one would have a Form with
one or more Subforms to enter related data; this makes it unnecessary to use
any code at all since existing records are synchronized and new records
automatically inherit the parent form's linking field.

What you are asking *can* be done... but the need to do so really indicates
that your database structure is in need of improvement.

More info please!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top