Unanswered: Bizarre Combo Box query results (results from different record)
I have a wierd problem where the lookup query for a combo box pulls data from a different record. Specifically, looking at the query below, the ctCompanyUID restriction makes it look like the ctCompanyUID from the first record in the database. If I edit the properties, and even return them to this same query, it will work - Until the form is closed and reopened.
SELECT tblLocationMaster.LocationUID, [Address1] & ", " & [address2] & ", " & [city] & ", " & [state] & ", " & [zipcode] AS Expr1 FROM tblLocationMaster WHERE (((tblLocationMaster.CompanyUID)=[ctCompanyUID]));
The form in question resides on one of four tab controls, each of which have parent/child relationships with the top level form. The top level form is "Customer", and the tabs/subforms are:
Contact, Location, Contract, Equipment.
Contract and equipment both use the same query (actually for contract, it has another subform that uses it) in combo boxes, and they all work - except the one on the contact form.
I have repaired the database, deleted the subform and reloaded it, and tried explicitly changing ctCompanyUID to parent!companyuid with several form events, and even on the onfocus event for the combo box - all to no avail.
Does anyone have an idea how to correct this behaviour?
Last edited by jdostie; 08-30-06 at 14:57.
Reason: correct spelling