I cannot make a selection from a combo box on a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a combo box on a form which I am using as a search box. When I click
on the down arrow in the combo box, I see the list of possible values, but I
am unable to select any of them; that is I click the mouse and no selection
is made and no error occurs. Does anyone have any idea what my problem may
be?

Thanks in advance,
Harry
 
Harry

It sounds like the combo box control has had its Enabled (?or Locked)
property set to Yes. Un-set it.
 
Hi Harry,

In addition to Jeff's input, make sure that your combo box includes an
AfterUpdate event procedure. Open the form in design view. Click on View >
Properties to display the Properties dialog (if it is not already displayed).
Select the Event tab. Now click on the combo box to select it. You should see
the name of the combo box displayed in the blue title bar of the properties
dialog.

On the Event tab, you should see [Event Procedure] listed next to After
Update. If not, click into this textbox. Select [Event Procedure] by clicking
on the dropdown arrow. Then click on the ellipses button (the button with the
three dots) which becomes visible when you click into this textbox. You
should find that the cursor is within an AfterUpdate event procedure for your
combo box.

If all else fails, try creating a new combo box. Here is a set of
instructions that I have prepared for this task:

Combo box to find a record
http://www.access.qbuilt.com/html/find_a_record.html


Good Luck,

Tom

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________

:

Harry

It sounds like the combo box control has had its Enabled (?or Locked)
property set to Yes. Un-set it.

--
Regards

Jeff Boyce
<Office/Access MVP>
__________________________________________


Hello,

I have a combo box on a form which I am using as a search box. When I click
on the down arrow in the combo box, I see the list of possible values, but I
am unable to select any of them; that is I click the mouse and no selection
is made and no error occurs. Does anyone have any idea what my problem may
be?

Thanks in advance,
Harry
 
Tom,

Excellent article, as I was having issues with the way I coded the combo
box. I guess I was taught how to search wrong, because this makes much more
sense. However, now I get a Data type mismatch in criteria expression when I
use the combo box. Any idea what the problem could be now?

Thanks,
Harry
 
Did you follow Tom's advice, and put code in the combo box's AfterUpdate
event along the lines of:

rs.FindFirst "[pkEmployerID] = '" & Me![cboFindRecord] & "'"

?

In the example above, pkEmployerID is a text field: that's why the single
quotes are put around Me![cboFindRecord]. If pkEmployerID was a numeric
field, that line would be:

rs.FindFirst "[pkEmployerID] = " & Me![cboFindRecord]
 
Doug,

It is, in fact, a numerical field. I changed the code, and it works
beautifully now.

Thanks everyone for your help!

Regards,
Harry

Douglas J Steele said:
Did you follow Tom's advice, and put code in the combo box's AfterUpdate
event along the lines of:

rs.FindFirst "[pkEmployerID] = '" & Me![cboFindRecord] & "'"

?

In the example above, pkEmployerID is a text field: that's why the single
quotes are put around Me![cboFindRecord]. If pkEmployerID was a numeric
field, that line would be:

rs.FindFirst "[pkEmployerID] = " & Me![cboFindRecord]

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Harry F. said:
Anybody have any idea regarding the below?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top