By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,529 Members | 1,860 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,529 IT Pros & Developers. It's quick & easy.

Access retrieving record incorrectly

P: n/a
Hi

Bit of an unusual one. I have an Access front end. Two tables
tblHeader and tblDetails. Each has an ID field (unique and primary)
plus other fields as necessary.

On aform is 3 fields from the header:
1. A text field
2. A SupplierID field (combo dropdown)
3. A SupplierBranchID field (combo dropdown)

The form is opened in "Add Only" mode.

I enter "abc" in the text field and choose a supplier and branch. I
then go to the sub-form (attached to tblDetails) and enter some
details.

I can happily close the form.

If I open the form again (as above - Add Only mode), and put abc into
the text field and choose the same supplier and branch, then the
previous header is retrieved (which has "abc" in the text box, and the
same supplier and branch), even though I want a "new" header record. A
new header record *is* created, but not "used" (ie tblDetails has the
"old" headerID inserted into it, rather than the "new" one.)I could
also put in other records in between, but it always goes to the last
record, with that same data in those three fields.

Does this make sense? (considering that tblHeader has a uniquie ID
field)

Can anybody think of why/how this could happen. If I "uniquify" the
text (eg add the date/time to it) then it is fine.

Help!

Regards,
Mark ...
Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.