Please explain concepts

L

Lee Hunter

I want to add records to Table A from fields in Tables B & C.

I have create a form bound (by record source) to Table A

I have created a combo box for Field 1 using Control Source for Field 1 and
record source of Table B.

I have created a list box for Field 2 using control source for Filed 2 and
record source for Table C.

The form boxes contain the correct values, but when I try to select the one
of the records from the combo box, nothing gets selected and no record is
added to Table A

Please correct my conceptual misunderstanding.
Thanks!
 
J

John W. Vinson

I want to add records to Table A from fields in Tables B & C.

Surely can be done... but why? You would ordinarily NOT want to store the same
piece of information twice, in two different tables. What are these tables,
and what need are you trying to satisfy?
I have create a form bound (by record source) to Table A

That will let the *USER* enter data.
I have created a combo box for Field 1 using Control Source for Field 1 and
record source of Table B.
I have created a list box for Field 2 using control source for Filed 2 and
record source for Table C.

Rowsource, not recordsource, right?
The form boxes contain the correct values, but when I try to select the one
of the records from the combo box, nothing gets selected and no record is
added to Table A
Please correct my conceptual misunderstanding.
Thanks!

Combo boxes let you *update a single field value*. A combo box will not create
a new record, though of course if you use a Form, move to the New Record on
the form (using the *> navigation button for instance), and then select a
value from the combo box, that (one) field will be updated with whatever is in
the combo box's bound column.

To *copy an entire record* from TableB to a new record in TableA - again,
something you ordinarily would NOT want to do - you would use an Append Query
selecting that record.

Could you explain what your tables actually are, and what you're trying to
accomplish?
 
L

Lee Hunter

Thanks for thr prompt response John.

I went back a create the revelant tables in a test environment, with jsut a
few records, and every thing work prefectly.

I then went back to the form, deleted and recreated each of the controls,
again worked perfectly.

Just FYI. I have a table of students with lots of revelant information. I
needed to begin collecting in what year each student took what class
(technical training). Rather than add additional fields to the student
table, I created a table of years the classes were offered and another of the
classes that were offered. I used this form to build a table related by
StudentID.

I can now run a query to see what students have completed what class and
what years they were taken. (Some classes must be taken every 3 years)

Comments, suggestions?
 
B

Bob Quintal

Thanks for thr prompt response John.

I went back a create the revelant tables in a test environment,
with jsut a few records, and every thing work prefectly.

I then went back to the form, deleted and recreated each of the
controls, again worked perfectly.

Just FYI. I have a table of students with lots of revelant
information. I needed to begin collecting in what year each
student took what class (technical training). Rather than add
additional fields to the student table, I created a table of years
the classes were offered and another of the classes that were
offered. I used this form to build a table related by StudentID.

I can now run a query to see what students have completed what
class and what years they were taken. (Some classes must be taken
every 3 years)

Comments, suggestions?

If your new table contains StudentID,ClassID,YearTaken, that's the
right way to do it. Optionally, you could add a pass/fail or grade
field to this table.

Q

 

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