Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

field properties table

Forum home » Delegate support and help forum » Microsoft Access Training and help » Field properties in table

Field properties in table

ResolvedVersion 2003

Ronel has attended:
Access Introduction course

Field properties in table

example
Would like the product id to always start with P and followed by 3 auto numbers.

Edited on Fri 1 Aug 2008, 08:06

RE: field properties in table

Hi Ronel,
Thank you for your post and welcome to the forum, in answer to your request,
You won't be able to combine text with an autonumber field. What you can do is create a unbound text box that will concantenate the text you want to display and the autonumber field number and use that to display to the user.

In your forms On Current event you can keep the unbound text box in sync with the records displayed.

UnboundTextBox.Value = "Your Text (P)" & " " & [autonumberfield]

In your underlying table the product ID would have to be a standard autonumber.

If however you do not wish to use an AutoNumber ID then you can utilise a combination of the Input Mask and the Validation Text boxes: in the Input Mask box type >L000
and in the Validation Rule type Like "P???"

If you then apply the Primary Key to this field and ensure No Duplicates it will allow you to only enter P followed by three numbers.

I hope that has helped, sorry about the AutoNumber though.

regards Pete
.

Access tip:

Convert A Form Into A Report

If there is a form that you want to to save as a report:

1. Open that form in Design View
2. Select File and Save As
3. In the Save As Dialog box Select Report

The system creates a report based on the form.

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.