WOW !!!
Hi! 
Scott
THANK U VERY MUCH 
Once again thanks for all the explaination u have given 
Its so helpful.
But can I bother u for one more thing now as my "Code" field is being
incremented and there is no problem in the database too but I want that when
ever my insert form is loaded the incremented value should be displayed .I was
trying the following code but this code only displayes the same value again
and again.
     <cfinput type="text" name="Code3" size="10" maxlength="10"
value="#Actinfo.Act_code#">

Thanks in advance


[EMAIL PROTECTED] (Scott J. Brader) wrote:
This comes right out of the help file for Access:

Change the starting value of an incrementing AutoNumber field

For a new table that contains no records, you can change the starting value
of an AutoNumber field that has its NewValues property set to Increment to a
number other than 1. For a table that contains records, you can also use
this procedure to change the next value assigned in an AutoNumber field to a
new number.

1       Create a temporary table with just one field, a Number field; set its
FieldSize property to Long Integer and give it the same name as the
AutoNumber field in the table whose value you want to change.

How?

2       In Datasheet view, enter a value in the Number field of the temporary
table that is 1 less than the starting value you want for the AutoNumber
field. For example, if you want the AutoNumber field to start at 100, enter
99 in the Number field.
3       Create and run an append query to append the temporary table to the table
whose AutoNumber value you want to change.

How?

Note   If your original table has a primary key, you must temporarily remove
the primary key before running the append query. Also, if your original
table contains fields that have the Required property set to Yes, the
Indexed property set to Yes (No Duplicates), or field and/or record
ValidationRule property settings that prevent Null entries in fields, you
must temporarily disable these settings.

4       Delete the temporary table.
5       Delete the record added by the append query.
6       If you had to disable property settings in step 3, return them to their
original settings.

When you enter a record in the remaining table, Microsoft Access uses an
AutoNumber field value 1 greater than the value you entered in the temporary
table.

Note   If you want to compact the database after changing the starting
AutoNumber value, make sure to add at least one record to the table first.
If you don't, when you compact the database, the AutoNumber value for the
next record added will be reset to 1 more than the highest previous value.
For example, if there were no records in the table when you reset the
starting value, compacting would set the AutoNumber value for the next
record added to 1; if there were records in the table when you reset the
starting value and the highest previous value was 50, compacting would set
the AutoNumber value for the next record added to 51.

-----Original Message-----
From: Denny dd [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 01, 2000 08:40
To: [EMAIL PROTECTED]
Subject: Incrementation of a value


Hi!
I have an insert form and I want that when ever this form is loaded the
value
of my "Code" field should be incremented.I know that in access database we
have the option of datatype as autonumber but I want my code to be of 3
digits.
Thanks in advance
Denny

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=sts&body=sts/cf_talk or send
a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body.


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to