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
Zoiks - 12 Apr 2008 09:58 GMT
Me again,
This site below showed me I built the DB incorrectly. I will change
it as suggested.
But if someone out there could still answer my question above, I'm
still interested in learning some "how to's".
http://allenbrowne.com/casu-23.html
Evi - 12 Apr 2008 14:51 GMT
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
> Me again,
>
[quoted text clipped - 4 lines]
>
> http://allenbrowne.com/casu-23.html
Evi - 12 Apr 2008 14:58 GMT
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.)
> 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
[quoted text clipped - 15 lines]
> >
> > http://allenbrowne.com/casu-23.html
Rick Brandt - 12 Apr 2008 12:28 GMT
> Hello,
>
[quoted text clipped - 19 lines]
> 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?

Signature
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com