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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi Line If Statement Syntax 1

Status
Not open for further replies.

TimTDP

Technical User
Feb 15, 2004
373
ZA
In Access 2000, I want to break the If...Then statement into multiple lines but can't get the sytax correct.

Eg:
If Container1 = True Or Container2 = True Or Container3 = True then

I want to write it like this:

If "Container1 = True " & _
"Or Container2 = True " & _
"Or Container3 = True" then

What is the correct syntax?
 
The line is not a string, so try it without the &'s and quotes:
[tt]If Container1 = True _
Or Container2 = True _
Or Container3 = True then[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top