Access Table - Input Mask

Good afternoon,

I've created an Input Mask but have fallen short on the Format Results.

This is the Mask "PROGRAM AREA: "9" @ "9,999" NSF";;# which works great if I have 1000+ but I also have cases where the value maybe 100+

PROGRAM AREA: 3 @ 1,250 NSF - Works
PROGRAM AREA: 1 @ 0,660 NSF - Does not Work

How do I modify the input mask to get the following results PROGRAM AREA: 1 @ 660 NSF

Thanks for your time and guidance
Aubie91Manager of Business SystemsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PatHartmanCommented:
I don't have time to look it up but try using # or 0 instead of 9 for the first three digits.  Leave the last one as a 9 if you always want to show at least one digit.  Either the # or the 0 is the optional numeric character.
0
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
Part of the issue too is that your table design is incorrect.

From the way that's formatted, you have two quantities in that field.

Jim.
0
PatHartmanCommented:
Good point.  You probably can't have a 9 followed by the optional character and ending with a 9 since that wouldn't make sense.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Aubie91Manager of Business SystemsAuthor Commented:
What other options are available to allow easy data input that is consistent in the look and feel
0
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
Give an example of the way it should look using a label to the right of the control, then verify the formatting and correct if it's wrong (if possible) in the BeforeUpdate event of the control.

In other words, you'll need to do it on your own as I doubt you'll get anything built-in to work the way you want it.

again, if this is a qty and another qty (or price), then those should be in two separate fields.  You'll find that built-in validation then will work better.   You can then display those two things any way you want (even combined as your showing).   But for entry and storage, you should be dealing with them separately.

Right now, you're going to have a devil of a time checking either one of those numbers.  For example, can they be negative?   Must either be a whole number?  Your not going to be able to easily check any of that.

Jim.
0
Jeffrey CoachmanMIS LiasonCommented:
To expand on what Jim stated...

Also consider that your input mask seems to contain redundant text.
    "PROGRAM AREA: "9" @ "9,999" NSF";;#
So "PROGRAM AREA" will appear in *every* record?
As Jim Stated, ...the name of the *field* should be "ProgramArea", ...and the value in that field should just be a single number.

The same would seem to go for "NSF".

So perhaps instead of trying to workaround an incorrect design, ...you should reconsider how your data is normalized, ...
Then (AFAICT) no input mask would be needed at all.

Finally, ...if you still needed to display the value as:
PROGRAM AREA: 3 @ 1,250 NSF
PROGRAM AREA: 1 @ 660 NSF

You could build a concatenated text field in a query:
SELECT YourTable.ID, YourTable.ProgramArea, YourTable.NSF, "PROGRAM AREA: " & [ProgramArea] & " @ " & Format([NSF],"#,000") & " NSF" AS DisplayAs
FROM YourTable;
ScenarioSample db is attached

JeffCoachman
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
and if that makes sense, make sure you select Jeff's comment as the solution, which explained very well in detail what I was suggesting.

Jim.
0
Aubie91Manager of Business SystemsAuthor Commented:
Thanks to all for your guidance and setting me on the correct path that will allow the users to input the data and keep the output with a consistent look and feel
0
Jeffrey CoachmanMIS LiasonCommented:
Actually,...
The "Design limitations" line of reasoning, was Jim's idea, ...I just added to it, ...so a split of the points might be a better resolution...
;-)

A final tidbit would be that it will be near impossible to do any "Aggregation" (Average NSF, ...for example) on your field in its current state

On a side note, ...I will say that a great many of the "issues" here have to do with inefficient designs.
A Rock solid design should always come first.
(before forms, queries, Reports, Inputmasks, ...or code, ...etc)

So most first question(s) should be along the lines of:
    This is what I need to do, ..._________________
     How do I design my database (Tables) to accomplish this?

So when you frame the question like so:
"This is what I have...It doesn't work, ...can you make it work?"
This boxes us in, as far as what we can offer as a solution.

Don't take it personally, things like this happens to a lot of members here.
...its just that "Making" a database is easy (especially with the tools Access provides)
But "designing" a database is more of a science.

Do a web search for some good beginner books on Database/Table design and "Normalization".

Then take a good look at your current db and possibly post questions here on its Purpose and structure.

;-)

JeffCoachman
0
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
Jeff's wasn't trying to be harsh, he was just trying to show you how you can get more mileage out asking a question on EE and get your project  off to a good start.

 As he said, many times a problem is simply a result of coming at it from the wrong direction.  We see this a lot for example with someone that has worked with Excel tries to use Access.  But if you apply an Excel approach to Access, it fails miserably.   Access requires a different mindset than Excel when you approach things.

 So it's best in the beginning if you make your questions about the goal rather than something specific.  Once your more familiar with Access, then you can get into specifics right off.   That's all he was saying.

We're here to help and will do that in any way we can.

Jim.
0
Jeffrey CoachmanMIS LiasonCommented:
Aubie91,

No problem buddy,
We were all rookies at one time
;-)


As you can see I provided lots of information for you...
Sample files, ...SQL, Screenshots, ...etc
..so as Jim says:
We're here to help and will do that in any way we can.

;-)

Jeff
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.