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!

Getting a runtime error 2147352567 (80020009) 1

Status
Not open for further replies.

Sheena2

Programmer
Apr 18, 2008
9
CA
Private Sub Combo35_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[AttendeeID] = " & Me![Combo35]
Let Me.AttendeeID = Me![Combo35]
Me.Bookmark = rs.Bookmark
Me.Refresh

End Sub

Please help thanks
 
You didn't say where you're getting the error but you can try
Code:
Private Sub Combo35_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As [red]DAO.Recordset[/red]

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[AttendeeID] = " & Me![Combo35]
    [red]If Not rs.NoMatch Then [/red]
       Me.AttendeeID = Me![Combo35]
       Me.Bookmark = rs.Bookmark
       Me.Refresh
    [red]End If[/red]
    
End Sub
 
Thanks for your help Golom.

But am still getting an error at Me.AttendeeID=Me![Combo35} - "Cannot assign value to this object" Please help. thanks
 
Why not simply this ,
Code:
Private Sub Combo35_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As DAO.Recordset
    Set rs = Me.RecordsetClone
    rs.FindFirst "AttendeeID=" & Me!Combo35
    If Not rs.NoMatch Then 
       Me.Bookmark = rs.Bookmark
    End If
End Sub

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top