Connecting Tech Pros Worldwide Help | Site Map

Increment Transaction NO.

Member
 
Join Date: Feb 2007
Posts: 54
#1: Feb 26 '07
Can anyone help me how to use the increment in auto number field?
Lives Here
 
Join Date: Oct 2006
Posts: 1,626
#2: Feb 26 '07

re: Increment Transaction NO.


Hi. this is from access help:
Create a field that automatically generates numbers
Open a table in Design view.


To insert the field within the table, click in the row below where you want to add the field, and then click Insert Rows on the toolbar.
To add the field to the end of the table, click in the first blank row.

In the Field Name column, type the name for the field, following Microsoft Access object-naming rules.


In the Data Type column, click the arrow and select AutoNumber.


To create an incrementing AutoNumber, leave the property settings in the bottom part of the window as they are (the FieldSize property is set to Long Integer and the NewValues property is set to Increment by default).
To create a random AutoNumber, in the bottom part of the window on the General tab, set the NewValues property to Random. For more information on the types of AutoNumber fields you can create, including fields for database replication, click .

Set the other field properties, if desired.
Member
 
Join Date: Feb 2007
Posts: 54
#3: Feb 26 '07

re: Increment Transaction NO.


Quote:

Originally Posted by willakawill

Hi. this is from access help:
Create a field that automatically generates numbers
Open a table in Design view.


To insert the field within the table, click in the row below where you want to add the field, and then click Insert Rows on the toolbar.
To add the field to the end of the table, click in the first blank row.

In the Field Name column, type the name for the field, following Microsoft Access object-naming rules.


In the Data Type column, click the arrow and select AutoNumber.


To create an incrementing AutoNumber, leave the property settings in the bottom part of the window as they are (the FieldSize property is set to Long Integer and the NewValues property is set to Increment by default).
To create a random AutoNumber, in the bottom part of the window on the General tab, set the NewValues property to Random. For more information on the types of AutoNumber fields you can create, including fields for database replication, click .

Set the other field properties, if desired.


Ok il try thanks
Member
 
Join Date: Feb 2007
Posts: 54
#4: Feb 26 '07

re: Increment Transaction NO.


Hey dude it helps a lot, but what if i want a formatted increment field like for example the default variable is 1 - i want it to be formatted as PC00001 (increment) and so on..?how can i do that?
Lives Here
 
Join Date: Oct 2006
Posts: 1,626
#5: Feb 26 '07

re: Increment Transaction NO.


Quote:

Originally Posted by hexagram

Hey dude it helps a lot, but what if i want a formatted increment field like for example the default variable is 1 - i want it to be formatted as PC00001 (increment) and so on..?how can i do that?

You can create a field that you increment yourself in code by checking the last record and updating the new record with whatever you like.
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,703
#6: Feb 26 '07

re: Increment Transaction NO.


Quote:

Originally Posted by hexagram

Hey dude it helps a lot, but what if i want a formatted increment field like for example the default variable is 1 - i want it to be formatted as PC00001 (increment) and so on..?how can i do that?

In case WillAKAWill's answer left any doubt, an Autonumber field does a particular job and is well defined. It cannot be used as an automatic sequencer in a table. Should you require this functionality you will need to implement that separately.
Reply