This is a repost as I am down to the last hair on my head.
I am using a listbox on a tab control on my mainform that has alisting
of all records associated with form main record. when I select the
record in the list box that I want to navigate to. my form does not
update. Using the watch tool I can see that it is finding the record.
Below is the code I am using.
This is in access 2003 and is not a subform. I am new to using ado as
well. Im sure this is just something that I am doing wrong.
Private Sub lstVacations_Af terUpdate()
Dim rs As ADODB.Recordset
Dim intCurVacReques t As Integer
Dim mark As Variant
Set rs = rsVacRequest.Cl one 'This is record set for main form
intCurVacReques t = CInt(Me.lstVaca tions.Column(8) )
Do While Not rs.EOF
'MsgBox rs.Fields(0).Va lue
' MsgBox rs!intTimeOffId
rs.MoveNext
Loop
rs.MoveFirst
rs.Find "[intTimeOffId] = " & intCurVacReques t
mark = rs.Bookmark
rs.Bookmark = mark
Exit Sub
End Sub
I am using a listbox on a tab control on my mainform that has alisting
of all records associated with form main record. when I select the
record in the list box that I want to navigate to. my form does not
update. Using the watch tool I can see that it is finding the record.
Below is the code I am using.
This is in access 2003 and is not a subform. I am new to using ado as
well. Im sure this is just something that I am doing wrong.
Private Sub lstVacations_Af terUpdate()
Dim rs As ADODB.Recordset
Dim intCurVacReques t As Integer
Dim mark As Variant
Set rs = rsVacRequest.Cl one 'This is record set for main form
intCurVacReques t = CInt(Me.lstVaca tions.Column(8) )
Do While Not rs.EOF
'MsgBox rs.Fields(0).Va lue
' MsgBox rs!intTimeOffId
rs.MoveNext
Loop
rs.MoveFirst
rs.Find "[intTimeOffId] = " & intCurVacReques t
mark = rs.Bookmark
rs.Bookmark = mark
Exit Sub
End Sub
Comment