Access combo box value

297 Views Asked by At

i don't know how to get value from combo box. I select one of firm on combo box

SELECT [Worker].[Firm] 
FROM [Worker] 
WHERE [Worker].[Firm] = X 
ORDER BY [Firm];

what i need to type for X? combo.Text don't work

2

There are 2 best solutions below

0
On

combo itself is enough.

However, you may need to use Forms![name of form]!combo

0
On

Try Me.combo. That's how I got the value from my combobox. Also, as a naming convention it's good practice to use cbo as a prefix, then a descriptive label for the combobox, i.e. if it's for a date, cboDate.