T
Tara
I have a command button that runs a query then opens a form. I would like to
have the code first evaluate today's date and then evaluate a field
(crntAvail) in a table (tbl125) for certain criteria, then determine whether
to open this form or another. If the today's date is greater than 03/15 (of
any given year) AND/OR if the value in the field crntAvail is 0, then open
one form, otherwise, open the 2nd form. The current code is:
Private Sub CmdOpnVoucher_Click()
DoCmd.OpenQuery "quptbl125ytd"
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmEmployeeContrib"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Thanks,
have the code first evaluate today's date and then evaluate a field
(crntAvail) in a table (tbl125) for certain criteria, then determine whether
to open this form or another. If the today's date is greater than 03/15 (of
any given year) AND/OR if the value in the field crntAvail is 0, then open
one form, otherwise, open the 2nd form. The current code is:
Private Sub CmdOpnVoucher_Click()
DoCmd.OpenQuery "quptbl125ytd"
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmEmployeeContrib"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Thanks,