K
Khartoum
Know somebody out there will laugh a this but i have the following function
that opens a certain form based on the password but because there are so many
forms, i am getting the 'too many continuation lines' message. How can i
rewrite the else if code to overcome this:
Private Sub okbutton_Click()
If Forms![password form].text_password = "atay1" Then DoCmd.OpenForm "Angela
Taylor" _
Else: If Forms![password form].text_password = "dgra15" Then DoCmd.OpenForm
"Dave Graham" _
Else: If Forms![password form].text_password = "fles16" Then DoCmd.OpenForm
"Fred Lester" _
Else: MsgBox "You have entered an incorrect password", vbOKCancel
DoCmd.Close acForm, "password form", acSaveNo
End Sub
(There are another 20+ lines attached to this)
Thanks John
that opens a certain form based on the password but because there are so many
forms, i am getting the 'too many continuation lines' message. How can i
rewrite the else if code to overcome this:
Private Sub okbutton_Click()
If Forms![password form].text_password = "atay1" Then DoCmd.OpenForm "Angela
Taylor" _
Else: If Forms![password form].text_password = "dgra15" Then DoCmd.OpenForm
"Dave Graham" _
Else: If Forms![password form].text_password = "fles16" Then DoCmd.OpenForm
"Fred Lester" _
Else: MsgBox "You have entered an incorrect password", vbOKCancel
DoCmd.Close acForm, "password form", acSaveNo
End Sub
(There are another 20+ lines attached to this)
Thanks John