Table Value

  • Thread starter Thread starter PCC
  • Start date Start date
P

PCC

I am trying to write an if statement to open a form based
on a value in a table. In other words if rates = 0 then
open form1 else open form2. Is there a way to write that
in access.

Thanks
 
Private Sub cmdView_Click()
Dim strDoc As String

If Rates = 0 Then
strDoc = "Form1"
Else
strDoc = "Form2"
End If

DoCmd.OpenForm strDoc
End Sub
 
Back
Top