using combo box to find records

G

Guest

Hi
I have used Allen Browne tips for serious users - using combo box to find
records
and written the following
Private Sub cboMoveTo_AfterUpdate()
Dim rs As Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "[BatchNo] = """ & Me.cbomoveto & """"
Me.Bookmark = rs.Bookmark
End Sub
but when run get message method or data member not found with .cbomoveto
highlighted BatchNo is text type field
thanks for any help
TK
 
A

Allen Browne

Try replacing the 2nd line with:
Dim rs As DAO.Recordset

If you have the ADO library referenced and a higher priority than the DAO
library, the recordset type may not match what you are actually using.

For more info on what references are and which you need in different
versions of Access, see:
http://allenbrowne.com/ser-38.html
 
G

Guest

Thank you Allen
my Dao library was not ticked your tips are very good once I just need to
understand the error
Thanks again
tina

Allen Browne said:
Try replacing the 2nd line with:
Dim rs As DAO.Recordset

If you have the ADO library referenced and a higher priority than the DAO
library, the recordset type may not match what you are actually using.

For more info on what references are and which you need in different
versions of Access, see:
http://allenbrowne.com/ser-38.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

tina said:
I have used Allen Browne tips for serious users - using combo box to find
records
and written the following
Private Sub cboMoveTo_AfterUpdate()
Dim rs As Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "[BatchNo] = """ & Me.cbomoveto & """"
Me.Bookmark = rs.Bookmark
End Sub
but when run get message method or data member not found with .cbomoveto
highlighted BatchNo is text type field
thanks for any help
TK
 
G

Guest

Hi Tina,

I need to do the exact same thing. My problem, as it is with many of the
posts I read here, is that I just do not speak VB. In the old days, I could
make dBase applications do things they were not even designed to do, but I
find that VB is just foreign to me. I've even tried to just copy and paste
code from here into an [Event Procedure], making whatever changes seemed
obvious but still can't make it happen.

So, whatever I do in Access has to be Macro based until I learn to speak VB.

With that in mind, can you provide me with a Macro that will use a combo box
to find records? I've tried "Findrecord" inserting "While <fieldname> =
<combo box>" into the "What" argument but I get a symphony of error messages.

Thanks
 
G

Guest

Hi Tina,

Please disregard previous post. As usual, with a little more patience, I
would have found the answer further down the list of posts. And I did (using
the combo box wizard)

Sorry to bother you.
 

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