Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ComboBox Assigns New Value to Control Source (more details)

Status
Not open for further replies.

Greaser

Technical User
Aug 1, 2001
84
CA
This issue is sporadic. When I first create (or re-create) the form, this problem does not exist. The problem can appear after 1 or 30 records have been created.

I have a mailQry query that contains the following tables:
contactTbl and mailTbl. The join field is ContactId.
This field is AutoNumber in contactTbl and Long Integer in mailTbl.
The contactTbl side is the "one" side and the mailTbl side is the "many" side of the one-to-many relationship.

I have a mail form with mailQry as its record souce.
This form contains a ComboBox with the following:

Row Source:
SELECT DISTINCTROW contactTbl.ContactId, contactTbl.[Last Name], contactTbl.[First Name], contactTbl.Organization
FROM contactTbl
ORDER BY contactTbl.[Last Name];

Limit To List: Yes

I create an entry in my mail form, datafilling the appropriate fields. If my second mail entry has the same contact, I go to the ComboBox and select the same contact. The following occurs:

A new ContactId is generated. The following error message appears:
"The currunt field must match the join key '?' in the table..."

Any ideas?
Your help with this issue is much appreciated.
Thanks,
John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top