Query Criteria Help

termeric

Active Member
Joined
Jun 21, 2005
Messages
280
I'm haivng some trouble with the a query returning a different record than what i expect. i have a form with a drop down menu to select customer name. this menu box contains the ID (set to 0" so it is not visible to the user) and the customer name. The query for the form uses ID (which is unique, since customer name might not be) to populate the form. The criteria is: Like [forms]![F_Case_Update].[oCaseName]

The form loads with nothing in the drop down search box, and when i make a selection, a blank record is created before pulling up the record that i want. what am i doing wrong here?

side note, i was originally using: Like [forms]![F_Case_Update].[oCaseName] & "*" as my criteria but it was returnign the wrong record for all the lower value records due to the wildcard at the end. i droped the & "*" form the query criteria and thats when i started seeing this new problem

Thanks for your comments
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
It could be your combo box.BOUNDCOLUMN is not set right.
You can always check the value of your controls in the immediate window (ctl-G)

type: ? [forms]![F_Case_Update].[oCaseName]
and it will return the value
 
Upvote 0
When my form loads, the oCaseUpdate box is null. I tried to set the default value to 1, for the first ID number in column 1, but that didnt appear to do anything. is there a way i can set a default value to appear so it no longer creates a new record each time the form is called?


I also took a look at my bound column, its set to 1, which is the column where ID is. i believe this is right.
 
Upvote 0

Forum statistics

Threads
1,214,617
Messages
6,120,541
Members
448,970
Latest member
kennimack

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top