469,287 Members | 2,553 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,287 developers. It's quick & easy.

Passing the value of a combo box to a query

139 100+
Hi,

I`ve created a query that accepts the value of two date fields on a form and one text field, so that i can produce a report based on the criteria. The date query works fine and so does the text query:

[forms]![frmMyform]![txtClientName]

However, I;d like to replace my text box with a combo box, the values of which come from a table. This is so my users don't misspell the names of my clients.

I've changed my query here to

[forms]![frmMyForm]![cmbClientName]

..but Access refuses to pass the value in the Combo box. Is there anyway around this?

Thanks!
Mar 7 '07 #1
5 11215
Rabbit
12,516 Expert Mod 8TB
It should pass the value just fine.

What are the settings and properties on your combobox.
Row Source
Bound Column
Number of Columns
Mar 7 '07 #2
ndeeley
139 100+
Hi there,

My row source is a table called Client List (SELECT [ClientList].[Client] FROM [ClientList])
The Bound Column is 1, and there are only 1 columns.

Thanks
Mar 8 '07 #3
ndeeley
139 100+
Rabbit,

Got it to work. Thanks for your help.
Mar 8 '07 #4
NeoPa
32,173 Expert Mod 16PB
Rabbit,

Got it to work. Thanks for your help.
Good for you :)
Can you post the solution you found. It may help others if they're in the same boat, or at least let them know to ignore this if it's not the same as their problem.
Mar 8 '07 #5
ndeeley
139 100+
Good for you :)
Can you post the solution you found. It may help others if they're in the same boat, or at least let them know to ignore this if it's not the same as their problem.

Basically I did as you suggested. I changed the location of the field in my query

[forms]![frmBookingIn]![cboClientName]

and ensured that the Bound number was 1, with 1 column, looking at the table in which my client list was stored. Didn't work before, but now it does. Can't explain why!
Mar 9 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

ddtpmyra
8 posts views Thread by ddtpmyra | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.