Auto reference

singingshiver

Registered User.
Local time
Today, 19:10
Joined
Jul 23, 2002
Messages
51
I have a form created where the first box is an auto reference. I want the reference to be an auto number with a default 3 letter reference before the auto number, ie SFI (AUTONUMBER).
Can you help.
 
If this is a fixed default prefix, you don't need to store it, as it will always appear on the form anyway. So just create an unbound calculated text box with

=SFI & [My Autonumber Field Name] as control source

and remove the autonumber field itself from the form
 
auto reference

the auto number will increase but the SFI prefix will remain constant. Will this still work?
 
Yes. Each record will show a change to the autonumber part, but the prefix will remain constant
 
By the way, that should read "SFI" & [Autonumber Field Name].

I forgot the inverted commas. Sorry
 
Sorry foir being a pain but where do I put that expression and how do i do it.
Thanks very much for your help
 
Open your form in Design mode.

drag a new text field from the toolbox (symbol shows as ab|)

This is an unbound (not stored in a table) field.

Put your cursor into the right hand box of this control. (The left hand box is the label)

Type in the expression, preceded by an = sign.

Tab out of the field to save it.

Delete the autonumber field from your form and put the calculated field in its place. You don't lose data doing this.

Post again if you get probs.
 
Having trouble im afraid.

I typed in the expression ="SFI" (SFI Reference) and I got "invalid syntax error".

I typed in ="SFI" and the field only displays SFI when loaded.

Any ideas?
Thanks a lot?
 
Yes, you have to include the ampersand followed by the field name in square brackets. Well done.
 

Users who are viewing this thread

Back
Top Bottom