using combo box to find records

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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
 
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
 
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.
 
Back
Top