Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If Statement

Status
Not open for further replies.

jeffsal

Technical User
Oct 29, 2005
24
US
I keep getting "Ilegal use of . ! or (" with the following code and can not figure it out:

If IsNull(Me.List32.Value) Then
MsgBox (" Hey!!! You forgot to Select a Report")
If Me.Text58.Value = "lvs" Then
Me.staff = "lvs"
ElseIf Me.Text58.Value = "kps" Then
Me.staff = "kps"
Else
stDocName = List32.Value
DoCmd.OpenReport stDocName, acPreview
DoCmd.Maximize
DoCmd.RunCommand acCmdZoom100
DoCmd.Close acForm, "App"
End If

Thanks
 
Again (as in thread702-1356014) you have a coding error:
[!]Else[/!]If Me.Text58.Value = "lvs" Then

Furthermore, which line of code is highlighted when the error raises ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I fixed that and still get the error. No line of code is highlighted. Thanks
 
No line of code is highlighted
Even when in Debug mode ?


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
How are ya jeffsal . . .

Perhaps:
Code:
[blue]   stDocName = List32.Value
[purple][b]should be:[/b][/purple]
   stDocName = Me.List32.Value[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top