Hi
I have one form that is based on a table with only one records in it. On this form, I want to evaluate the value in the Environment field. If the value = "TEST" then I want to open one form, if the value in the field is "DEV" then I want to open a different form. I am trying to do this on the close function of the first form.
So far i have
Private Sub Form_Close()
if me.environment = "TEST" then
docmd.openreport rpt_recon_summary_hdr, acviewnormal
else
docmd.openreport rpt_recon_summary_trans,acviewnormal
end if
end sub
I am getting an error run-time error '13'
type mismatch on the line of if me.environment = "TEST"
any suggestions.
thanks
I have one form that is based on a table with only one records in it. On this form, I want to evaluate the value in the Environment field. If the value = "TEST" then I want to open one form, if the value in the field is "DEV" then I want to open a different form. I am trying to do this on the close function of the first form.
So far i have
Private Sub Form_Close()
if me.environment = "TEST" then
docmd.openreport rpt_recon_summary_hdr, acviewnormal
else
docmd.openreport rpt_recon_summary_trans,acviewnormal
end if
end sub
I am getting an error run-time error '13'
type mismatch on the line of if me.environment = "TEST"
any suggestions.
thanks