Another question that is probably a bit basic for old hands. Sorry... Could you give me a bit more guidance?
This follows from another question (a little guidance...) that I have marked as solved. A bit premature, as it turns out.
I'm trying to build a database to collect and process information about model aircraft contests. I've attached a snip of the
relationships, following the advice I got earlier. Also attached is a snip of a sample screen with completed flight details.
And a snip of the resulting entry in the table "tblflighttime" (it's the bottom record).
My aim is to build a form to use during the contest, for an operator to select in succession: contestant, model, event (the
three combo boxes, choosing data from tables already entered) then click a radio button to identify the specific flight that
the data is being recorded for, and enter the flight details (time and landing yes/no). The output is then a record in
tblflighttime with fkeventsenteredid coming from the bound field on the bottom combo box, and fkflighttype coming from the
option group with the radio buttons.
In the QBE the form has its record source as tblflighttime, with criteria for the two foreign keys set to the relevant combo
boxes. Yet another snip attached.
The picture shows text fields to the right of the cascading combo boxes showing the actual bound values from the user's
selection: they are all the expected keys to the data that is in the tables. So far so good.
The resulting record however records only the flight details, and not the foreign keys to complete the relationships.
I am sure this must be pretty basic, but I am still struggling with where to look to make those two foreign keys appear in
I've tried setting the control source for the combo box and option group to their relevant table fields, but Access then
won't let me make selections on the screen. OK, you knew that would happen.... I've still got a lot to learn
I'll be really pleased to get any pointers to how to link the form properly to the table! And of course, let me know if I
need to provide more information.
Thanks in advance
Reply With Quote
11-17-2011, 05:54 AM
Windows 7 64bit Access 2010 64bit
Join Date Jun 2010
Location Dayton, OH
I would typically use a subform in the form you show since the flight info is on the many side of the relationship. The
form-subform should link via the key fields (and the flight time table would populate), without that link the key fields will
not populate as you indicated. Now, if you want to keep the form as is rather than using a subform design, you will most
likely have to use an unbound form and thus would need code behind your save button that in essence runs an append query.
That query would pull the values from the appropriate form controls and store the info in the flight time table. The
drawback of this is that you would not be able to use the form to see previously entered data.
Any chance you can post your actual database? Screenshots only tell part of the story. I would recommend running the
compact and repair utility on the database, zip the database and post the zip file. (this will keep the size of the file