Problem with combo box string in query

gwunta1907

Registered User.
Local time
Today, 23:56
Joined
Jan 11, 2007
Messages
26
This seems so simple but I cannot get it to work. I have read on a few forums and posts that the Like keyword cannot be used with a combo box string/value, although I don't have a reliable source to confirm this.

My problem is as follows: I have a form called frm_converter which has a combo box (Combo6) which looks up a set of text formatted records. The combo box displays the lookup records fine and I can select form the list.

I also have another table (tbl_rates) that contains (amongst other things) a text based field. I have written a query to filter the records in the tbl_rates table based on the selection from the combo box. In the criteria field I have the following syntax.

Like [Forms]![frm_converter]![Combo6].[Value]

When I run the query I get no records returned when I should have 3 records returned. I have tried the following different variations of the above code but to no avail:

Like [Forms]![frm_converter]![Combo6]
Like [Forms]![frm_converter]![Combo6].[Value] & "*"
Like [Forms]![frm_converter]![Text8] (where Text8's value is derived from Combo6)

I cant just use [Forms]![frm_converter]![Combo6] because the text field in the lookup table (where the ComboBox derives its values) differs by only a couple of characters at the end of the text field in each record to the table I am trying to query.

Can someone please tell me where Im going wrong, any help would REALLY be appreciated. Ive been at this problem for the last 3 hours and it really shouldnt be this hard surely
 
Sorry, I forgot to add that the field in the combo box is bound only to the text field of its associated lookup table.
 
OK, Ive just eliminated another possible cause. I have created a lookup table that has EXACTLY the values in the text field of the table to be queried, thereby eliminating the need for the 'Like' keyword in the query design. Still no joy so something else must be preventing it. It seems to work fine for the other criteria I have in the query, which restricts the records in the target table by grabbing the value from a MSCalendar Object. The working syntax for that one is:

Like [Forms]![frm_converter]![Calendar0]

So its really got me perplexed why the other one isnt working
 

Users who are viewing this thread

Back
Top Bottom