Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Blank Space in field

Blank Space in field

Blank Space in field

I have the following code attached to a button which takes a value that I have inputted into an undefined field on the form and should insert that number of records, filling the first field with a space. For instance I may want 10 blank records before the normal records start in a table ( does this make sense?)

i, x  longint



 for x from 1 to i


This code fails to insert a space into the field. I am sure it is something simple.



RE: Blank Space in field


Yes.  Paradox doesn't allow text (alpha) fields to end with a space; it automagically deletes trailing spaces from text fields.

Tony McGuire
"It's not about having enough time; we have the rest of our lives.  It's about priorities."

RE: Blank Space in field

Thanks Tony,

The process works manually. In edit mode I can press "insert" followed by pressing the spacebar, "insert" again & so on. It is just very tedious if I need to say add 67 blank records, so I thought it could be easily automated.


RE: Blank Space in field


Are you able to go back to those records, and is the space still there?

Instead of using sendkeys(), can you not then just assign a field value of " "?

partno=" "

From everything I've learned and experienced, Paradox deletes trailing spaces from alpha fields.  If your alpha field contains only a space, that's a new one on me.

Also, do you need blank records, or [otherwise empty] records with a blank in that field?

Tony McGuire
"It's not about having enough time; we have the rest of our lives.  It's about priorities."

RE: Blank Space in field

Yes, once the space is there, the record stays put. The table lists a part number with a retail price. The table is then merged with a word document to produce a price ticket with the price and part number printed on it. Each sheet of price labels contains about 189 small labels. I may only want to use the first 30 labels and rather than waste the remaining sheet, next time I count the number of labels already used and merge blank labels the next run of printing. Is that clear? Hence the blank record. As I said if I open the table I can manually insert a record, press spacebar, insert another record and continue until I have the desired number of empty records.

Paradox can be so frustrating at times!


RE: Blank Space in field


But my question still stands.  Is the space still there if you go back to one of those records?

Can you not create a dummy field, that doesn't print on the labels, and add information in that field - thereby getting an empty record (for the purpose of those labels, anyway)?

Just a thought.

And if you don't want to put this 'extra' field on the form, you could use the dmPut() function to add the value to the field.

Tony McGuire
"It's not about having enough time; we have the rest of our lives.  It's about priorities."

RE: Blank Space in field

Also, have you tried adding


after the sendkeys()?

Since you aren't using a uiObject, you might try doing that as well; and then using the uiObject in conjunction with the post/unlock.

Just some idears.

Tony McGuire
"It's not about having enough time; we have the rest of our lives.  It's about priorities."

RE: Blank Space in field


Didn't make any difference.

I think the easiest way will be to add a dummy field.

I just find it hard to comprehend that something so simple can be done manually but not via code. I suppose that's the paradox of Paradox!

Also I looked at the table in tableview, inserted some records with a space in the field. I wasn't able to remove the space using backspace or delete, and the record disappear. The only way to remove the record was to use ctrl delete, whereas with code the field won't accept the space. Have you tried this on a dummy table? Table structure is field1 = A10, field 2 = $. A sample entry for a record would be 1002200801, £125



RE: Blank Space in field

Just to say I have added a dummy field and it works a treat.
Many thanks Tony


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close