form not working properly

G

Guest

I am getting an error message "you can't add or change a record b/c a related
record is required in table "tblSEX"

This is what I did: Own a kennel & want to gather info about dogs coming in
& out.

Have a tblOwners (owner last&first name)
tblBREED
tblCOLOR
tblSEX
tblTRAINING
tblDogs (with dogID,dogname, breedID, colorID, SexID, TrainingID, OWNERID)

My relationship bascially has tblDOGS in the middle & all the tables related
to it. (1 to Many)

Built Queries for each table qryBREED, qryCOLOR, qrySEX, qryTRAINING
for the qryBREED I have 2 columns, I chose th e* (chooses the enire table) &
BreedColor (I did this for each qry, but chose what I needed on each table)


Built a form using the wizzard & chose:
tblOWNERS -- main form
tblDOGS -- sub form

So I can choose the breed, sex, color, & training type this is what I did to
each field:
Contol sorce BreedID
row source qryBREED
Bound Column 0
Limit to list YES
Column count 2
column widths 0;2 (this way I can choose the breed & not see the number)

I did this for each field, but related the information needed.

I can add my name as owner,
I add my dog name,
I choose labrador retriever for breed
I choose yellow for color
I choose female for sex

I try to add another dog or close out etc, & I get the error: "you can't add
or change a record b/c a related record is required in table "tblSEX"

NOW THE KICKER: if i change the sex to male, i can save it fine.

If I try to add another dog with for instance black female, lab, I will get
the similar error.

Any ideas on what I am doing wrong. Thanks. I'm almost there!!!
 
G

Guest

Go to tblSEX and make sure that Female is in it as a record. Make sure that
it's in the same column as Male. Make sure that there are not leading or
trailing spaces in the word "female".

Also make sure that you are actually inserting male and female. If you are
using table-level lookup fields, all bets are off.
 

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