J
John Michael
I know what this code is supposed to do.
Look up a record based on the field txtCardNumberSearch
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.findfirst strFieldname & " =" & Str(Nz(Me![txtCardNumberSearch], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
I am curious as to what this line does and if I have it in the right place
since I have the code below after it.
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
I may want to put an else statement after if to trap the event.
I use this code after the above code:
If rs.NoMatch Then
Me.Section(acDetail).Visible = False
txtCardNumberSearch = Null
MsgBox "Member VIP Card Number Not Found.", , "Search Failure!"
txtCardNumberSearch.SetFocus
' SpecialEffectEnter
Else
If boolIsLoginAllowed() = True Then
Me.Section(acDetail).Visible = True
Me!VarSessionDirty.Value = False
SpecialEffectExit
cmdEnter.Enabled = True
cmdEnter.SetFocus
End If
after it in case there is no match, but what would cause an End of file to
be reached.
Thanks
John Michael
Look up a record based on the field txtCardNumberSearch
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.findfirst strFieldname & " =" & Str(Nz(Me![txtCardNumberSearch], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
I am curious as to what this line does and if I have it in the right place
since I have the code below after it.
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
I may want to put an else statement after if to trap the event.
I use this code after the above code:
If rs.NoMatch Then
Me.Section(acDetail).Visible = False
txtCardNumberSearch = Null
MsgBox "Member VIP Card Number Not Found.", , "Search Failure!"
txtCardNumberSearch.SetFocus
' SpecialEffectEnter
Else
If boolIsLoginAllowed() = True Then
Me.Section(acDetail).Visible = True
Me!VarSessionDirty.Value = False
SpecialEffectExit
cmdEnter.Enabled = True
cmdEnter.SetFocus
End If
after it in case there is no match, but what would cause an End of file to
be reached.
Thanks
John Michael