Nested Subform causing duplicate records

B

bbcrock

I have two lookup tables (A +B) that have a parent/child relationship
to each other. I want to assign each value to a third record. The B
record, the child, is specifically not required.

I am using two fields in my linked master fields attribute, one for
each of the foreign keys I need to save.

When I pick an item from the first combo box, A, a record gets saved
w/ the B FK blank. Then I pick the child subcategory, B, a second
record gets saved with all the data.

I admit the database design is a little hokey, I'm sure there was a
better way to do this than to store both a parent category and
subcategory in the same record, but it made the most sense to me,
given that the subcategory field wasn't required and therefore
couldn't be relied upon to determine the parent.

Can I fix this form without redesigning the database???

thanks,

Don
 
P

Pat Hartman

Remove your save code from the AfterUpdate events of the two fields and add
a button for the user to push when he wants to save.
 
B

bbcrock

I will look into that. Thanks.

Right now I have each of the drop downs default to "None" in the
database. So that in the AfterUpdate, the record is saved no matter
what.

Don
 

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