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

How to add only spaces to a memo field

Status
Not open for further replies.

MrStar

Programmer
Sep 30, 2002
53
0
0
DK
I have a table with several memo fields. All defined with required = No and AllowZeroLength = Yes

I can add 10 spaces to a memo field thru VBA, but if I then try to change the same field thru a form by adding one more space, I end up with a field containing Null.

Can anybody tell me how I can add spaces and nothing else to a memo field in a form ?
 
I suggest you change the defaults to Required= Yes, AllowZeroLenght=Yes, Default="". This will avoid the null field. Empty fields will have a zero length string which is easy to test for.
 
But in my application I need to store sometimes 5 spaces or 10 spaces.
I want the user to key in the spaces thru a form.
 
Spaces or characters?
What's the significance of storing x number of spaces?
 
Normally there is no meaning i storing spaces, but in this case I'm coding agains a mainframe system, where spaces also has a special meaning. Therefore I need to store spaces.

I can store spaces as "¤" or some other special character, and then convert it to spaceds before uploading to mainframe, but if there is a way to use spaces, I would prefere to use this method.
 
What about storing the number of required spaces, and then when you do the upload use the Spaces() function.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top