default Valuse + validation

R

Rony

I need to define the following
In "Ref" Field
If shares are bot
REF = BT 9999 (digits optional)
if sold
type = ST 8888 (digits optional)

AND SET VALIDATION RULE FOR THE SAME

IF BOT LIKE "BT"
IF SOLD LIKE "ST"

I NEED TO GET THE FIRST TWO ALPA BT & ST AUTOMATICALLY AND THE RESTRICT THE
USER TO CHANGE IT

I NEED TO DO IN VB

PLEASE HELP
THANKS
RON
 
S

Sergey Poberezovskiy

Why cannot you split alpha and numerical parts into two
separate fields? Then you may create validation rule for
your text part and restrict users from modifying that (by
locking form's control).

HTH
 
R

Rony

In this case how can define parameters for printing. In the print option I
want user to enter parameters like BT 9999 ST9999.

RON



Sergey Poberezovskiy said:
Why cannot you split alpha and numerical parts into two
separate fields? Then you may create validation rule for
your text part and restrict users from modifying that (by
locking form's control).

HTH
 
D

Douglas J. Steele

Create a query that has a computed field to concatenate the two fields. In
the query grid, it'll look something like MyConcatenatedField: [Field1] &
[Field2]

Use the query wherever you would otherwise have used the table. (Note that
the computed field will not be updatable. However, when you change the value
in either Field1 or Field2, the value of MyConcatenatedField will change)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Rony said:
In this case how can define parameters for printing. In the print option I
want user to enter parameters like BT 9999 ST9999.

RON
 
Top