Split code over multiple lines

S

Sean

I know this should be easy but, I don't know the jargon for it So,
Microsoft's "dictionary" help is of no use.

How do I split a piece of code over multiple lines to make it easier to read
and maintain o limited screen real estate.

e.g.:
BoxCount = DCount("*", "tblBox", "[BoxReadySwitch] = False And
[AssignedToShipmentSwitch] = False AND [AssignedToVendorSwitch] = False AND
[BoxCompletedSwitch] = False")


Thanks
Sean
 
S

Sandra Daigle

The line continuation character is the underscore (_) and it must be
preceded by a space. Also, if you are splitting up a string you must
concatenate the pieces to form a single string:

BoxCount = DCount("*", "tblBox", "[BoxReadySwitch] = False " _
& " And [AssignedToShipmentSwitch] = False " _
& " AND [AssignedToVendorSwitch] = False " _
& " AND [BoxCompletedSwitch] = False")
 
S

Sean

Thank you Sandra. You guys are always great help.

Sean


Sandra Daigle said:
The line continuation character is the underscore (_) and it must be
preceded by a space. Also, if you are splitting up a string you must
concatenate the pieces to form a single string:

BoxCount = DCount("*", "tblBox", "[BoxReadySwitch] = False " _
& " And [AssignedToShipmentSwitch] = False " _
& " AND [AssignedToVendorSwitch] = False " _
& " AND [BoxCompletedSwitch] = False")



--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

I know this should be easy but, I don't know the jargon for it So,
Microsoft's "dictionary" help is of no use.

How do I split a piece of code over multiple lines to make it easier
to read and maintain o limited screen real estate.

e.g.:
BoxCount = DCount("*", "tblBox", "[BoxReadySwitch] = False
And [AssignedToShipmentSwitch] = False AND [AssignedToVendorSwitch] =
False AND [BoxCompletedSwitch] = False")


Thanks
Sean
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top