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!

Vertical Lines

Status
Not open for further replies.
Aug 16, 2005
2
US
Ok, I got some help on this from another forum and they pointed me to , specifically the GrowBox Function. If you check this Function out you'll see that it is a simple solution for generating vertical lines, and creating a report that looks like a spread sheet.

The problem occurs with this statement:

StringBLine(StringCnt([Text],Chr(13))+(Int((Len([Text])/46)+0.5))+1)

The function StringCnt takes in two parameters, the Text field which is a string of characters and Chr(13) which is a carriage return. When there is nothing typed in the text field of the table (ie. Text equals NULL), the entire thing craps out.

I would like to try and get around the Null exception without having to write VBA code, as I have not worked with it very much.

If there's a way to handle this possiblity of Text equals Null inside the report, maybe in the command that the statement is used in, that would be ideal.

I know the vertical lines issue comes up alot, so maybe someone has seen this before.
 
Hi
I guess the MPVs.Org would provide a better solution, but this seems to work. Change the field Text in the table to TextX; change the query so that Text now reads:
Text: IIf(IsNull([TextX]),"None",[TextX])

Substituting a suitable word for 'None'.
 
And what about this ?
StringBLine(StringCnt(Nz([Text]," "),Chr(13))+(Int((Len([Text] & "")/46)+0.5))+1)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I revisited the report on the foot of PHVs suggestion, and found that my comments were wrong. In a conversion to Access 2000, the length of Text must be 23 characters or greater for the report to format properly. Maybe I have done something wrong :-(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top