A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Creating matching record in new form



 
 
Thread Tools Display Modes
  #1  
Old January 26th, 2010, 03:22 PM posted to microsoft.public.access.forms
JCA
external usenet poster
 
Posts: 8
Default Creating matching record in new form

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?
  #2  
Old January 26th, 2010, 07:48 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Creating matching record in new form

On Tue, 26 Jan 2010 06:22:09 -0800, JCA wrote:

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!
--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:04 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.