Link to home
Start Free TrialLog in
Avatar of purelink
purelink

asked on

Format text box with PO BOX

Sorry, I'm a newbie and not a programmer, just a great hacker. I am working on an address field in access 2003. The issue is this field is mixxed with street addresses and post office boxes. We want to standardize formatting of "PO BOX" in this field if possible. It is a practice if a PO BOX is used it is always first not the street adress. So, can "PO BOX" be a mask? Additionaly this field is currently set in AfterUpdate to StrConv(string, vbProperCase)
Avatar of dannywareham
dannywareham
Flag of United Kingdom of Great Britain and Northern Ireland image

Is there an actual format for PO Box?
For example, are they always just "PO Box 123", like I think?
In which case, why not just store the number part?

If teh text part is always the same, you can set it to an inputmask on the text box.
Is that what you need?
Avatar of purelink
purelink

ASKER

The format wold be for "PO BOX" to be in uppercase I actually had the colum set wit StrCase("string",vbUppercasae) but we have letters that pull from the data base and it became an issue for some of the managemnt how it looked So then i used StrCase("string", vbPropercase) but that made it this way; "Po Box" not bad but you see what I am chasing?
Thank you for any help yo may have!
OK.
Have an input mask on the control field like this:

LL9LLL09999

Then have code on teh after_update of the text vox:

me.textboxname.value = UCase(me.textboxname.value)

try that
:-)
OK, My limited knowledge has hung me. I easily added the input mask field as suggested, however, I am having a problem witht the additional code.  beside after update field I am choosing code builder, then Macro builder but that's where im stuck I am just doing trial and error to test.  I will follow up after I get this.
dannywareham,
Thank you for your help, I think i may have steered you a bit wrong though after looking at the input mask. This field is called Address1 and it contains both a traditional address; 123 Main Street or PO BOX 1234. It is our company policy that if the address has a PO# it will always be first in the address field, and typically, we then will use Address2  field for the traditional address; 123 Main Street.
Thank you!
 
ASKER CERTIFIED SOLUTION
Avatar of dannywareham
dannywareham
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, that's right.  
Use the code I posted in the After_Update() event.
OK I will try that
FYI,
I have been away, I will be back on this project shortley.
Thank you for the support !