docmd.findrecord problem
hi,
i have a requirement to jump to certain record in my access adp, therefore i use 'docmd.findrecord'. the strange thing is record doesn't jump to matching criteria (doesn't access form_current also as it used to be). but if i step through the code, it works, also works if i place the code in different form in the same adp.
here's the part of the code:
If boolEst Then
strAns = MsgBox("Do you want to copy from template?", vbQuestion + vbDefaultButton2 + vbYesNo, gMsgBoxTitle)
If strAns = vbNo Then
mboolIsTmpl = False
strAns = MsgBox("Do you want to copy from previous quotation?", vbQuestion + vbYesNo + vbDefaultButton2, gMsgBoxTitle)
If strAns = vbNo Then
txtTourCode.SetFocus
Exit Sub
End If
If Not mboolCopyTour Then Exit Sub
Else
If Not mboolCopyTemplate Then
mboolIsTmpl = False
Exit Sub
End If
End If
Else
strAns = MsgBox("Do you want to copy from previous quotation?", vbQuestion + vbYesNo + vbDefaultButton2, gMsgBoxTitle)
If strAns = vbNo Then
txtTourCode.SetFocus
Exit Sub
End If
If Not mboolCopyTour Then Exit Sub
End If
' Call setControl(False, True)
sfrTRQuotationIncDtl.Locked = False
DoCmd.FindRecord mstrTourCode
- anyone can help?
thanks in advance
|