Enter Data into Form

Z

Zoiks

Hello,

I'm trying to enter data into a form which includes 2 tables "A" and
"B". "B" is simply yes / no check boxes.
If the user does not use the forms check boxes in "B", a record is not
created for that table (which I understand). But, I would like this
record to be created (even though it is "blank"). Could someone help
me with a good way to do this? Probably simple, but I cant think of
it.

Table A
NameID (autonumber - PK)
F-Name (text)
L-Name (text)

Table B
NameID (number - PK)
Single (y/N - No default)
School (y/N - No default)

I've tried some things like buliding events on "Before / After
Update", "On Change" with no luck obviously.
Thanks
 
R

Rick Brandt

Zoiks said:
Hello,

I'm trying to enter data into a form which includes 2 tables "A" and
"B". "B" is simply yes / no check boxes.
If the user does not use the forms check boxes in "B", a record is not
created for that table (which I understand). But, I would like this
record to be created (even though it is "blank"). Could someone help
me with a good way to do this? Probably simple, but I cant think of
it.

Table A
NameID (autonumber - PK)
F-Name (text)
L-Name (text)

Table B
NameID (number - PK)
Single (y/N - No default)
School (y/N - No default)

I've tried some things like buliding events on "Before / After
Update", "On Change" with no luck obviously.
Thanks

In the BeforeUpdate of the form set a value of one of the B fields (even if
you just set it equal to itself).

Creating a blank "dummy" record is NEVER a good idea though. Why do you
think you need to do this?
 
E

Evi

You are perhaps thinking of the sort of structure where you get a 1 To 1
table such as StudentTable, StudentFurtherDetailsTable which is a perfectly
valid design.

One way is to make StudentID (the Primary key in the StudentTable) into a
Foreign Key field in StudentFurtherDetailsTable. So StudentFurtherDetails
can have its own primary key. Then, you can add a Student's further details
whenever you want. You can make the StudentID Foreign Key field (or any
combination of fields) Unique by using the Index Button in Table Design view
Evi
 
E

Evi

If you want to ensure that a record is added to the StudentDetails table for
every student (ie only StudentID is added) then you can use an Append Query
which is activated by code as soon as you have finished adding a new record
to your form.
This sounds harder than it is and help is available here if you ever need to
do this. It will be helpful (for you as well as your respondant) if you
state briefly, without using jargon, what your database is about and supply
table and field names.

(If you are planning to input stuff using tables with subdatasheets then you
can kiss that goodbye! They do nothing of much use.)
 

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