470,647 Members | 1,056 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

Access retrieving record incorrectly

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
0 1265

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by warner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.