Table formatting

B

Bill

I have a table that has 10 characters in a "part" field.
There could only be 7 or 6 (variable) characters that are
actual, usable data. I have a form where a user can enter
the "part" # and a filter brings up data for that part BUT
I don't want the user to have to enter "sssCCCCCCC" (s=
space, c= character)every time.

Is there a way to format the data at the table or the
filter entry so it will match only the "usable"
caharacters and ignore the spaces?

Thanks!
 
R

Rick B

They should not have to enter spaces.


123AAA
123AAA

Why would they enter spaces?

Do you prceed your name with spaces if the field is 10 charatcers long?

Bill
Bill

Am I missing something?





I have a table that has 10 characters in a "part" field.
There could only be 7 or 6 (variable) characters that are
actual, usable data. I have a form where a user can enter
the "part" # and a filter brings up data for that part BUT
I don't want the user to have to enter "sssCCCCCCC" (s=
space, c= character)every time.

Is there a way to format the data at the table or the
filter entry so it will match only the "usable"
caharacters and ignore the spaces?

Thanks!
 
J

John Vinson

I have a table that has 10 characters in a "part" field.
There could only be 7 or 6 (variable) characters that are
actual, usable data. I have a form where a user can enter
the "part" # and a filter brings up data for that part BUT
I don't want the user to have to enter "sssCCCCCCC" (s=
space, c= character)every time.

Is there a way to format the data at the table or the
filter entry so it will match only the "usable"
caharacters and ignore the spaces?

Eh!?

Access truncates leading and trailing spaces anyway, by default. It's
possible but rather difficult to force it to retain the blanks.

If the user types A31XYZ into the field, that's what will be stored.
You can right justify it in a Textbox on a form or report for display
purposes.
 
V

Van T. Dinh

John

Using GUI, I find Access truncates trailing spaces but
retains the leading spaces (unless code is used to remove
them). I have just did a quick test in DatasheetView of a
Table in AXP to confirm this.

In a number of imports I have done (C-Tree, Excel?), I
noticed also that Access retains the trailing spaces also.

Cheers
Van
 
V

Van T. Dinh

You can use the Like operator with wildcards in Filter.

HTH
Van T. Dinh
MVP (Access)
 

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