Private Sub cmdView_Click()
Dim strDoc As String
If Rates = 0 Then
strDoc = "Form1"
Else
strDoc = "Form2"
End If
DoCmd.OpenForm strDoc
End Sub

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>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