Combobox Bookmark Not working?

rebelgeek

New Member
Joined
Nov 23, 2008
Messages
27
The following code works except for the final Bookmark syncronization??
Why??
Form is linked to a query with key in decsending order.
Debug print prints each time a phone number is found.
Code:
Option Compare Database
Option Explicit
Private Sub Combo0_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[fldPhone] = '" & Me!Combo0 & "'"
If Not rs.EOF Then
    Debug.Print "Found"
    Me.Bookmark = rs.Bookmark
End If
End Sub
Thanks!!
Bruce...
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Success the following code works in Access 2007
Code:
Private Sub cboPhone_AfterUpdate()
    Dim strCriteria As String
    Dim rs As DAO.Recordset
    Set rs = Me.RecordsetClone
    strCriteria = "[fldKey] = " & Screen.ActiveControl
    rs.FindFirst strCriteria
    If Not rs.EOF Then
        Me.Bookmark = rs.Bookmark
    End If
End Sub
(y)
 
Upvote 0

Forum statistics

Threads
1,215,429
Messages
6,124,840
Members
449,193
Latest member
MikeVol

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top