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 » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Input Mask and removing leading spaces



 
 
Thread Tools Display Modes
  #1  
Old November 8th, 2004, 11:34 PM
Woodrow
external usenet poster
 
Posts: n/a
Default Input Mask and removing leading spaces

I have defined an input mask for a text field as:

!aaaaaaaaaaaaaaaa" code "9999

Which results in:

aname code 123

I need this to be updated and stored in the table left justified, ( able to
remove the leading spaces ). Removing the leading ! in the mask obviously
leaves a gap. The use of an LTRIM may be an answer but I am not sure how to
integrate this for entry to this field.

I am very new to the arcane world of access programs.
  #2  
Old November 12th, 2004, 09:31 AM
Brett Collings [429338]
external usenet poster
 
Posts: n/a
Default

On Mon, 8 Nov 2004 15:34:03 -0800, "Woodrow"
wrote:

I have defined an input mask for a text field as:

!aaaaaaaaaaaaaaaa" code "9999

Which results in:

aname code 123

I need this to be updated and stored in the table left justified, ( able to
remove the leading spaces ). Removing the leading ! in the mask obviously
leaves a gap. The use of an LTRIM may be an answer but I am not sure how to
integrate this for entry to this field.

I am very new to the arcane world of access programs.


Woodrow, I suspect you haven't had an answer because it's not really
clear what you are trying to do and what data it is that you are
trying to do it with.

The field looks very odd because you are mixing different bits of data
in the one field and this is what is giving you all this grief.

My suggestion is to have a name field and a code field. The name and
code are entered via a form of course and when you want to combine
them in a report, you just create a new object which just looks like a
field with the ControlSource being something like

=[NameField] & "code" & [CodeFieldName]

That's it, this is a much more structured way of breaking up your data
and later gives you the opportunity of searching and grouping on
[CodeFieldName]



Cheers,
Brett

----------------------------------------------
Be adventurous, be bold, be careful, be a star
----------------------------------------------
Brett Collings
Business & Systems Analyst
Management Information Systems Developer
 




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 02:39 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.