form combo box accessing two tables not showing correct results

G

Guest

on a database for a wildcat sanctuary I have an Animal Records table and an
Animal Species table. The Animal Records table has a species ID field
relating it to the primary key in the Species table. (many:1)

In my Animal Record Entry form, I have a combo box that has the following
properties:

Control Source: [Animal Records].[Species id]
Row Source: Select [species id], [name] from [Animal Species]
Bound Column: 0
Column Widths: 0";1"
Default Value: [Animal Records].[Species id]

When I check the form in Form View, it shows all the Species from the
species table in the drop down box, but the default value seems to always be
one off.

For instance, Elwood is a jaguar (species id=3), but the default value for
his record is kinkajou (species id=4). If I change the dropdown box to
"Jaguar" it updates the Species ID in Animal Records to "2". The IDs listed
in the Species table are correct, The species id in Animal Records is a
Number field, the Species id in Species is AutoNumber. I don't understand
what is causing the problem!

Any suggestions?

Amanda
 
G

GeoffG

I don't know how you want the Default Value of your ComboBox to work, but I
don't think you can have the Default Value set to the Control Source field.

The Default Value is the initial value when you create a new record. In
other words, it's the initial value for the Control Source field for a
record that hasn't yet been saved. Therefore, you can't pull a value from
the Control Source field and have it as the Default Value. After the record
has been saved, the Default Value is ignored.

Geoff
 

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