M
matt mattcannen via AccessMonster.com
This is a repost as I am down to my 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.
Private Sub lstVacations_AfterUpdate()
Dim rs As ADODB.Recordset
Dim intCurVacRequest As Integer
Dim mark As Variant
Set rs = rsVacRequest.Clone 'This is record set for main form
intCurVacRequest = CInt(Me.lstVacations.Column(8))
Do While Not rs.EOF
'MsgBox rs.Fields(0).Value
' MsgBox rs!intTimeOffId
rs.MoveNext
Loop
rs.MoveFirst
rs.Find "[intTimeOffId] = " & intCurVacRequest
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.
Private Sub lstVacations_AfterUpdate()
Dim rs As ADODB.Recordset
Dim intCurVacRequest As Integer
Dim mark As Variant
Set rs = rsVacRequest.Clone 'This is record set for main form
intCurVacRequest = CInt(Me.lstVacations.Column(8))
Do While Not rs.EOF
'MsgBox rs.Fields(0).Value
' MsgBox rs!intTimeOffId
rs.MoveNext
Loop
rs.MoveFirst
rs.Find "[intTimeOffId] = " & intCurVacRequest
mark = rs.Bookmark
rs.Bookmark = mark
Exit Sub
End Sub