A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Table formatting



 
 
Thread Tools Display Modes
  #1  
Old June 7th, 2004, 07:13 PM
Bill
external usenet poster
 
Posts: n/a
Default Table formatting

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!
  #2  
Old June 7th, 2004, 07:18 PM
Rick B
external usenet poster
 
Posts: n/a
Default Table formatting

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?





"Bill" wrote in message
...
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!


  #3  
Old June 7th, 2004, 09:08 PM
John Vinson
external usenet poster
 
Posts: n/a
Default Table formatting

On Mon, 7 Jun 2004 11:13:40 -0700, "Bill"
wrote:

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.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
  #4  
Old June 8th, 2004, 12:56 AM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default Table formatting

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



-----Original Message-----
On Mon, 7 Jun 2004 11:13:40 -0700, "Bill"
wrote:

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.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
.

  #5  
Old June 8th, 2004, 12:58 AM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default Table formatting

You can use the Like operator with wildcards in Filter.

HTH
Van T. Dinh
MVP (Access)



-----Original Message-----
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!
.

  #6  
Old June 8th, 2004, 01:56 PM
Bill
external usenet poster
 
Posts: n/a
Default Table formatting

The original table has the field and has the character length set as 10. When I enter a number for the filter if I don't enter the spaces to make the character string length 10, and match the table string exactly, it bombs. There has to be a way for when I call in the table or set up the filter for everybody to ignore the spaces and only focus on the text.

Thanks!
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.