Custom format for textbox

bnefit

New member
Local time
Today, 14:42
Joined
Jul 28, 2020
Messages
23
I have a textbox for user to enter the asset number which consists of "AST" follow by 6 numbers. Can I customise the format of the textbox to align with our asset number and if yes, how can I do it? Thanks :)
 
I'm not sure what you mean. Can you post some examples?
 
use form. and on the design view, select the asset textbox.
On it's Property Sheet->Format->Text Alignment (Left, Right, General).
 
what about the FORMAT() function? in code? as a table-level mask? I believe these represent numbers:
Code:
000000 (required digits)
and:
Code:
###### (optionals)
and for alpha characters:
Code:
LLLLLLL
 
I'm not sure what you mean. Can you post some examples?
Examples of the asset number? AST001234, AST000089, etc.

So
1) If the user did not enter "AST" but only enter 6 numbers, I would like the textbox to add "AST" in front of the numbers to result in format "AST000000"
2) If the user did not enter "AST" and only enter 4 numbers, I would like the textbox to add "AST and fill in missing numbers as "0" to result in format "AST004444"
3) If the user enter "AST" and only 3 numbers, I would like the textbox to fill in missing numbers as "0" to result in format "AST000333"

Hope it makes sense.
 
Last edited:
create a BeforeChange data macro to the table in design view.
same as in the picture:
ASSET.png
 

Users who are viewing this thread

Back
Top Bottom