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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP Trying to Change recordsource of form with Combo

Status
Not open for further replies.

Shadez

Programmer
Jul 5, 2001
57
US
I have the following code in the on update event of the combo box.

Me.RecordSource = "SELECT BMembers.*, [BQualify].[Category] FROM (BQualifyList INNER JOIN BQualify ON [BQualifyList].[BQualify]=[BQualify].[Category]) INNER JOIN BMembers ON [BQualify].[MemberID]=[BMembers].[CustomerID] WHERE ((([BQualify].[Category])=[Combo62]));"


I am trying to filter the record source using combo62's value. when triggered though I get prompted for the data for this field. If I type in the data it works great. Why is this not finding the data in this box.

Please post an example of this fix :(
 
Try this:
WHERE ((([BQualify].[Category])=forms![formname]![Combo62]));"
and if that doesn't work try
Dim myString as string
myString = me.Combo62
me.recordsource = "Select....Where ((([BQualify].[Category])=""" & myString & """));"


 
thank you very much, your second suggestion works perfect :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top