Combo box

J

Jenny

Hi,
I would be like to be able to have my form automatically
go to a particular record when I click a row in a combo
box. I used the following code in the AfterUpdate event
of the Combo box, but nothing happens when I click chose
a row from the combo box. Can anyone tell me why or what
I should do? Thanks, Jenny

Private Sub Combo44_AfterUpdate()
'Move to the record selected in the control
Me.RecordsetClone.FindFirst "[MID] = " & Me![Combo44]
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
 
R

Roxie Aho

Jenny,
I use the exact code except for field and control names
and it works fine. The field name [MID} might be your
problem. Mid is a function used to search for text in the
middle of a string. Access does funny things when you use
reserved names.
Roxie Aho
(e-mail address removed)
 
G

George Nicholson

In addition to another posting advising against the use of reserved keywords
for field names (MID), what does MID hold, number or text? If it is text
then you need to make sure Me![Combo44] is bracketed with single quotes:
"[MID] = '" & Me![Combo44] & "'"

Hope this helps,
 

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

Top