Combo box that doesn't respond

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

I have a combo box that doesn't respond to a user's
selection. The list drops down, but nothing happens when a
list option is clicked.

Has anyone seen this before?

Thanks,
Bill
 
Bill said:
I have a combo box that doesn't respond to a user's
selection. The list drops down, but nothing happens when a
list option is clicked.

Has anyone seen this before?

This typically happens when the control is Locked (a property that may
be set from code)
 
Thanks for your suggestions. I checked the Locked
property, and it was set to no. The combo box was created
with the wizard, so the code is pretty straight forward:
Private Sub Combo49_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ContactID] = " & Str(Nz(Me![Combo49],
0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Thanks again,
Bill
 
Hi,
It's probably not finding a match, in which case nothing will happen.
What is the data type of ContactId?
If it is numerical, why do you have the Str function in there?
If it is in fact a string, then you need to delimit it with single quotes.

HTH
Dan Artuso, MVP

Thanks for your suggestions. I checked the Locked
property, and it was set to no. The combo box was created
with the wizard, so the code is pretty straight forward:
Private Sub Combo49_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ContactID] = " & Str(Nz(Me![Combo49],
0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Thanks again,
Bill
-----Original Message-----


This typically happens when the control is Locked (a property that may
be set from code)
 
Dan,

Thanks for your input. This has become a real puzzler.
Yes, the data type for the ContactID field is autonumber.
The Str function was input by the combo box wizard. I have
gone through the same steps on a different machine, and
everything worked as expected. I've even created a new
database on the machine on which the combo box wouldn't
work, recreated the combo box, and it still wouldn't work.
When I check the code and properties for the different
databases, I cannot find any differences, but I'm not able
to get the combo box to work on the one machine. I hope
that lays out the scenario completely.

Thanks again,
Bill
-----Original Message-----
Hi,
It's probably not finding a match, in which case nothing will happen.
What is the data type of ContactId?
If it is numerical, why do you have the Str function in there?
If it is in fact a string, then you need to delimit it with single quotes.

HTH
Dan Artuso, MVP

Thanks for your suggestions. I checked the Locked
property, and it was set to no. The combo box was created
with the wizard, so the code is pretty straight forward:
Private Sub Combo49_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ContactID] = " & Str(Nz(Me![Combo49],
0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Thanks again,
Bill
-----Original Message-----
Bill wrote:

I have a combo box that doesn't respond to a user's
selection. The list drops down, but nothing happens when a
list option is clicked.

Has anyone seen this before?

This typically happens when the control is Locked (a property that may
be set from code)


.
 
Back
Top