You need to get at the recordset you are using for record display, use a find method to locate the record indicated in the Combo box and then use bookmarks to synchronise (The find method gives you access to the record but does not move the current position)
You need something like the following...
The Combo Box cannot be bound, of course, set its data up in Form_Load or similar.Code:Dim rst As Recordset Dim vBmark As Variant Dim strFind As String Set rst = Me.Data1.Recordset strFind = "Field='" & Trim$(Str(Me.Combo1.ItemData(ListIndex))) & "'" 'NB I cannot remember how to get the data back from the ComboBox - this a'int it!!! 'Do not include ' delimiters if the value is a number! 'Check the ListIndex is <> -1 rst.MoveFirst rst.FindFirst (strFind) If Not rst.NoMatch Then vBmark = rst.Bookmark Me.Data1.Recordset.Bookmark = vBmark Else MsgBox "Find failed!" End If
Hope it helps.
Paul
P.S. There is no recordset clone but the Data1.Recordset has a clone property
P.P.S. Ensure you are bound to a snapshot or a dynaset (Not a table) or it will not work.
[Edited by paulw on 10-31-2000 at 09:04 AM]




Reply With Quote