data entry form for several tables

G

Guest

I have a relational database with the following tables and keys:
Birds(BirdID)
Events(EventID, based on Date/Time and Site)
BirdEvent(BirdID,EventID as foreign keys)

Data entry form I am designing has text boxes for BirdID, Date/Time, Site,
and various data. Thus the form would be entering data into the BirdEvent
table. If it is a new BirdID, will Access automatically create a new record
in the Birds table? If it is a new Date/Time and Site, will Access
automatically create a new record in the Events table? If not, I know how to
write code to check on existing records and write a new one if necessary.
Thanks
 
U

UpRider

LAF, I would have the Birds table as the recordsource for a main form and
Events as the recordsource for the subform.
Eliminate the BirdEvent table (I can see no purpose for it).
This setup will allow you to enter new birds in the main form and when the
first keystroke is entered into the subform, the BirdID will automatically
be created for the Events table.
With a combobox on the main form to lookup Birds, you can easily find
existing birds and add events for them.

HTH, UpRider
 
G

Guest

Thanks, UpRider,

The Bird/Event table is a necessary junction table for the many to many
relationship between birds and events. Also, it is the essential table for
data collected on each bird during each event. A combo box is out of the
question because thousands of individual birds and events are involved. I
would prefer to avoid subforms because that will be confusing to data
enterers. Might it be best to have an unbound data entry form and then use
code to determine whether or not a new record needs to be written in the
Birds or Events tables? Use of such code could also determine if an error
occurred such as a BirdID that is recaptured without being in the Birds table.
Thanks, LAF
 

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