Treason
#@$%#!
- Local time
- Today, 10:15
- Joined
- Mar 12, 2002
- Messages
- 340
I have a combo-box, that I would like to update into a record where 2 values meet. For example, If ID# in the combo-box is 0000, then find record with ID# 0000 in the form. This has been a complicated ordeal for me.
I have looked into the RecordsetClone property hoping to find some answers. I came across this code in MS help.
Sub SupplierID_AfterUpdate()
Dim rst As Recordset
Dim strSearchName As String
Set rst = Me.RecordsetClone
strSearchName = Str(Me!SupplierID)
rst.FindFirst "SupplierID = " & strSearchName
If rst.NoMatch Then
MsgBox "Record not found"
Else
Me.Bookmark = rst.Bookmark
End If
rst.Close
End Sub
Where do I put this code? Am I just stupid? I tried ListBox7_AfterUpdate() ..
I have looked into the RecordsetClone property hoping to find some answers. I came across this code in MS help.
Sub SupplierID_AfterUpdate()
Dim rst As Recordset
Dim strSearchName As String
Set rst = Me.RecordsetClone
strSearchName = Str(Me!SupplierID)
rst.FindFirst "SupplierID = " & strSearchName
If rst.NoMatch Then
MsgBox "Record not found"
Else
Me.Bookmark = rst.Bookmark
End If
rst.Close
End Sub
Where do I put this code? Am I just stupid? I tried ListBox7_AfterUpdate() ..