Split code over multiple lines

  • Thread starter Thread starter Sean
  • Start date Start date
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
 
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")
 
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
 
Back
Top