D
David Matyas
I am using the following code (created by the wizard) to
allow to bring my form to a particular entery. But when I
edit the entery (ex: put new information into a blank
cell), it puts that record onto the bottom of the list
(even though it keeps its record number).
Also, There are certin names that i click on the list, and
it will not bring it up, rather it brings to the first
record (no matter how many times i try going to that
record) But if I were to go to the record by typing in its
record number on the bottom, then it would work.
Here is the Code:
Option Compare Database
Private Sub Combo22_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Phone Number] = '" & Me![Combo22] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo31_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Ralphs Card #] = '" & Me![Combo31] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo33_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Phone Number] = '" & Me![Combo33] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo35_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Ralphs Card #] = '" & Me![Combo35] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo39_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Phone Number] = '" & Me![Combo39] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Thank You
allow to bring my form to a particular entery. But when I
edit the entery (ex: put new information into a blank
cell), it puts that record onto the bottom of the list
(even though it keeps its record number).
Also, There are certin names that i click on the list, and
it will not bring it up, rather it brings to the first
record (no matter how many times i try going to that
record) But if I were to go to the record by typing in its
record number on the bottom, then it would work.
Here is the Code:
Option Compare Database
Private Sub Combo22_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Phone Number] = '" & Me![Combo22] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo31_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Ralphs Card #] = '" & Me![Combo31] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo33_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Phone Number] = '" & Me![Combo33] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo35_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Ralphs Card #] = '" & Me![Combo35] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo39_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Phone Number] = '" & Me![Combo39] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Thank You