Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find combo box 2

Status
Not open for further replies.

assets

Technical User
Oct 23, 2002
574
AU
I have a issue. I had to reinstall office and lost some information
the following code worked till the reinstall

Code:
Private Sub Combo98_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[AddressID] = " & Str(Nz(Me![Combo98], 0))
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
If you select a name from the list (current name now not on list in box) it produces a can not find project or library error at str (Nz. Can any one tell me which libray I need to use. Can not remember Thanks

Never give up never give in.

There are no short cuts to anything worth doing :)
 
How are ya assets . . .

You need [purple]Microsoft DAO 3.6 Object Library[/purple] to run the code. To [blue]check/install[/blue] the library, in any code window click [blue]Tools[/blue] - [blue]References...[/blue] In the listing find the library and [blue]make sure its checked.[/blue] Then using the up arrow, [purple]push it up as high in priority as it will go[/purple]. Click OK.

Then try the following:
Code:
[blue]   Dim rst As DAO.Recordset
   
   Set rst = Me.RecordsetClone
   rst.FindFirst "[AddressID] = '" & Me!Combo98 & "'"
   
   If Not rst.NoMatch Then
      Me.Bookmark = rst.Bookmark
   Else
      MsgBox "Record Not Found!"
   End If
   
   Set rst = Nothing[/blue]
[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thanks.

I should have said what I was loading (access 2003)

Visual basic for applications
Microsoft Access 11 Object Library
Microsoft DAO 3.6 object libary
OLE Automation
Microsoft VB for application exensbilty 5.3
Microsoft ADO Ext 2.8 for DDL and security
MS Word 11 object library
MS Active x Data objects (Multi demential0 2.8
MS Active x Data objects 2.0 library
MS Ofice 12 object library
Missing outlook office outlookview control
MS Outlook 11 Object library


Never give up never give in.

There are no short cuts to anything worth doing :)
 
MS Ofice [!]12[/!] object library
This is 2007, not 2003

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV . . .

Good eye! [thumbsup2]

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thanks for suggestion change it still does not work on this computer but on others it does

Never give up never give in.

There are no short cuts to anything worth doing :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top