Autonomberrrrrrrrrrrrrrr

G

Guest

Hi all,

I have a big problem in my form that's called "re-escalation",I open the
form in add mode to add a record,in my table that represents the record
source of this form i'm using an autonumber property field,before i open this
form,i open another one (called "escnew") to get some data on my form,the
problem is that when i open this form ,it's supposed to view a new number in
the field "code" that has its property set to autonumber,but actually i don't
get new number,i get repeated one !!!
Can anybody help??
Here's the command i use to open the form:

Private Sub Command201_Click()
DoCmd.OpenForm "Escnew", acNormal, , "
Code:
=[forms]![PHcsq]![Code2]", ,
acHidden
DoCmd.OpenForm "Re-escalation", acNormal, , "", acFormAdd, , acWindowNormal
[forms]![Re-escalation]![Customer Name] = [forms]![Escnew]![Customer Name]
[forms]![Re-escalation]![Phone] = [forms]![Escnew]![Phone]
[forms]![Re-escalation]![Country] = [forms]![Escnew]![Country]
[forms]![Re-escalation]![e-mail] = [forms]![Escnew]![e-mail]
[forms]![Re-escalation]![URL] = [forms]![Escnew]![URL]
[forms]![Re-escalation]![Language] = [forms]![Escnew]![Language]
[forms]![Re-escalation]![Installation ID] = [forms]![Escnew]![Installation ID]
[forms]![Re-escalation]![Product Key] = [forms]![Escnew]![Product Key]
[forms]![Re-escalation]![PID] = [forms]![Escnew]![PID]
[forms]![Re-escalation]![Part number] = [forms]![Escnew]![Part number]
[forms]![Re-escalation]![Product Name] = [forms]![Escnew]![Product Name]
[forms]![Re-escalation]![Version] = [forms]![Escnew]![Version]
[forms]![Re-escalation]![Confirmation ID] = [forms]![Escnew]![Confirmation ID]
[forms]![Re-escalation]![Message] = [forms]![Escnew]![Message]
[forms]![Re-escalation]![Error message] = [forms]![Escnew]![Error message]
[forms]![Re-escalation]![Contract] = [forms]![Escnew]![Contract]
[forms]![Re-escalation]![Authorization number] =
[forms]![Escnew]![Authorization number]
[forms]![Re-escalation]![License number] = [forms]![Escnew]![License number]
[forms]![Re-escalation]![Enrolment number] = [forms]![Escnew]![Enrolment
number]
[forms]![Re-escalation]![Quantity] = [forms]![Escnew]![Quantity]
[forms]![Re-escalation]![Program ID] = [forms]![Escnew]![Program ID]
[forms]![Re-escalation]![SAP ID] = [forms]![Escnew]![SAP ID]
[forms]![Re-escalation]![ProductSPLA] = [forms]![Escnew]![ProductSPLA]
[forms]![Re-escalation]![Company] = [forms]![Escnew]![Company]
[forms]![Re-escalation]![Error message] = [forms]![Escnew]![Error message]
[forms]![Re-escalation]![Error message] = [forms]![Escnew]![Error message]

End Sub
 
A

Arvin Meyer [MVP]

There is a bug in Access 2000 that allows a repeated autonumber under
certain conditions. Make sure that you have all of your service pack
installed. Now make several copies of the database as a backup.

Changing the autonumber to long integer, and adding a new long integer
column to each related table, then add a new autonumber field to your
problem table. Now run an update query, linking on the old column, to fill
the new column with the new autonumber.

After you're satisfied that everything works properly, you can deleted the
old columns and any extra copies of the database.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Pietro said:
Hi all,

I have a big problem in my form that's called "re-escalation",I open the
form in add mode to add a record,in my table that represents the record
source of this form i'm using an autonumber property field,before i open
this
form,i open another one (called "escnew") to get some data on my form,the
problem is that when i open this form ,it's supposed to view a new number
in
the field "code" that has its property set to autonumber,but actually i
don't
get new number,i get repeated one !!!
Can anybody help??
Here's the command i use to open the form:

Private Sub Command201_Click()
DoCmd.OpenForm "Escnew", acNormal, , "
Code:
=[forms]![PHcsq]![Code2]", ,
acHidden
DoCmd.OpenForm "Re-escalation", acNormal, , "", acFormAdd, ,
acWindowNormal
[forms]![Re-escalation]![Customer Name] = [forms]![Escnew]![Customer Name]
[forms]![Re-escalation]![Phone] = [forms]![Escnew]![Phone]
[forms]![Re-escalation]![Country] = [forms]![Escnew]![Country]
[forms]![Re-escalation]![e-mail] = [forms]![Escnew]![e-mail]
[forms]![Re-escalation]![URL] = [forms]![Escnew]![URL]
[forms]![Re-escalation]![Language] = [forms]![Escnew]![Language]
[forms]![Re-escalation]![Installation ID] = [forms]![Escnew]![Installation
ID]
[forms]![Re-escalation]![Product Key] = [forms]![Escnew]![Product Key]
[forms]![Re-escalation]![PID] = [forms]![Escnew]![PID]
[forms]![Re-escalation]![Part number] = [forms]![Escnew]![Part number]
[forms]![Re-escalation]![Product Name] = [forms]![Escnew]![Product Name]
[forms]![Re-escalation]![Version] = [forms]![Escnew]![Version]
[forms]![Re-escalation]![Confirmation ID] = [forms]![Escnew]![Confirmation
ID]
[forms]![Re-escalation]![Message] = [forms]![Escnew]![Message]
[forms]![Re-escalation]![Error message] = [forms]![Escnew]![Error message]
[forms]![Re-escalation]![Contract] = [forms]![Escnew]![Contract]
[forms]![Re-escalation]![Authorization number] =
[forms]![Escnew]![Authorization number]
[forms]![Re-escalation]![License number] = [forms]![Escnew]![License
number]
[forms]![Re-escalation]![Enrolment number] = [forms]![Escnew]![Enrolment
number]
[forms]![Re-escalation]![Quantity] = [forms]![Escnew]![Quantity]
[forms]![Re-escalation]![Program ID] = [forms]![Escnew]![Program ID]
[forms]![Re-escalation]![SAP ID] = [forms]![Escnew]![SAP ID]
[forms]![Re-escalation]![ProductSPLA] = [forms]![Escnew]![ProductSPLA]
[forms]![Re-escalation]![Company] = [forms]![Escnew]![Company]
[forms]![Re-escalation]![Error message] = [forms]![Escnew]![Error message]
[forms]![Re-escalation]![Error message] = [forms]![Escnew]![Error message]

End Sub
[/QUOTE]
 
G

Guest

Thank you for your answer,but actually i'm using Access 2003 not 2000

Arvin Meyer said:
There is a bug in Access 2000 that allows a repeated autonumber under
certain conditions. Make sure that you have all of your service pack
installed. Now make several copies of the database as a backup.

Changing the autonumber to long integer, and adding a new long integer
column to each related table, then add a new autonumber field to your
problem table. Now run an update query, linking on the old column, to fill
the new column with the new autonumber.

After you're satisfied that everything works properly, you can deleted the
old columns and any extra copies of the database.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Pietro said:
Hi all,

I have a big problem in my form that's called "re-escalation",I open the
form in add mode to add a record,in my table that represents the record
source of this form i'm using an autonumber property field,before i open
this
form,i open another one (called "escnew") to get some data on my form,the
problem is that when i open this form ,it's supposed to view a new number
in
the field "code" that has its property set to autonumber,but actually i
don't
get new number,i get repeated one !!!
Can anybody help??
Here's the command i use to open the form:

Private Sub Command201_Click()
DoCmd.OpenForm "Escnew", acNormal, , "
Code:
=[forms]![PHcsq]![Code2]", ,
acHidden
DoCmd.OpenForm "Re-escalation", acNormal, , "", acFormAdd, ,
acWindowNormal
[forms]![Re-escalation]![Customer Name] = [forms]![Escnew]![Customer Name]
[forms]![Re-escalation]![Phone] = [forms]![Escnew]![Phone]
[forms]![Re-escalation]![Country] = [forms]![Escnew]![Country]
[forms]![Re-escalation]![e-mail] = [forms]![Escnew]![e-mail]
[forms]![Re-escalation]![URL] = [forms]![Escnew]![URL]
[forms]![Re-escalation]![Language] = [forms]![Escnew]![Language]
[forms]![Re-escalation]![Installation ID] = [forms]![Escnew]![Installation
ID]
[forms]![Re-escalation]![Product Key] = [forms]![Escnew]![Product Key]
[forms]![Re-escalation]![PID] = [forms]![Escnew]![PID]
[forms]![Re-escalation]![Part number] = [forms]![Escnew]![Part number]
[forms]![Re-escalation]![Product Name] = [forms]![Escnew]![Product Name]
[forms]![Re-escalation]![Version] = [forms]![Escnew]![Version]
[forms]![Re-escalation]![Confirmation ID] = [forms]![Escnew]![Confirmation
ID]
[forms]![Re-escalation]![Message] = [forms]![Escnew]![Message]
[forms]![Re-escalation]![Error message] = [forms]![Escnew]![Error message]
[forms]![Re-escalation]![Contract] = [forms]![Escnew]![Contract]
[forms]![Re-escalation]![Authorization number] =
[forms]![Escnew]![Authorization number]
[forms]![Re-escalation]![License number] = [forms]![Escnew]![License
number]
[forms]![Re-escalation]![Enrolment number] = [forms]![Escnew]![Enrolment
number]
[forms]![Re-escalation]![Quantity] = [forms]![Escnew]![Quantity]
[forms]![Re-escalation]![Program ID] = [forms]![Escnew]![Program ID]
[forms]![Re-escalation]![SAP ID] = [forms]![Escnew]![SAP ID]
[forms]![Re-escalation]![ProductSPLA] = [forms]![Escnew]![ProductSPLA]
[forms]![Re-escalation]![Company] = [forms]![Escnew]![Company]
[forms]![Re-escalation]![Error message] = [forms]![Escnew]![Error message]
[forms]![Re-escalation]![Error message] = [forms]![Escnew]![Error message]

End Sub
[/QUOTE]
[/QUOTE]
 
A

Arvin Meyer [MVP]

The format of the database, which by default is Access 2000, is what I was
referring to. In any case, make sure that you are up to date with service
packs. The cure is the same, no matter which version you are using.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Pietro said:
Thank you for your answer,but actually i'm using Access 2003 not 2000

Arvin Meyer said:
There is a bug in Access 2000 that allows a repeated autonumber under
certain conditions. Make sure that you have all of your service pack
installed. Now make several copies of the database as a backup.

Changing the autonumber to long integer, and adding a new long integer
column to each related table, then add a new autonumber field to your
problem table. Now run an update query, linking on the old column, to
fill
the new column with the new autonumber.

After you're satisfied that everything works properly, you can deleted
the
old columns and any extra copies of the database.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Pietro said:
Hi all,

I have a big problem in my form that's called "re-escalation",I open
the
form in add mode to add a record,in my table that represents the record
source of this form i'm using an autonumber property field,before i
open
this
form,i open another one (called "escnew") to get some data on my
form,the
problem is that when i open this form ,it's supposed to view a new
number
in
the field "code" that has its property set to autonumber,but actually i
don't
get new number,i get repeated one !!!
Can anybody help??
Here's the command i use to open the form:

Private Sub Command201_Click()
DoCmd.OpenForm "Escnew", acNormal, , "
Code:
=[forms]![PHcsq]![Code2]",
,
acHidden
DoCmd.OpenForm "Re-escalation", acNormal, , "", acFormAdd, ,
acWindowNormal
[forms]![Re-escalation]![Customer Name] = [forms]![Escnew]![Customer
Name]
[forms]![Re-escalation]![Phone] = [forms]![Escnew]![Phone]
[forms]![Re-escalation]![Country] = [forms]![Escnew]![Country]
[forms]![Re-escalation]![e-mail] = [forms]![Escnew]![e-mail]
[forms]![Re-escalation]![URL] = [forms]![Escnew]![URL]
[forms]![Re-escalation]![Language] = [forms]![Escnew]![Language]
[forms]![Re-escalation]![Installation ID] =
[forms]![Escnew]![Installation
ID]
[forms]![Re-escalation]![Product Key] = [forms]![Escnew]![Product Key]
[forms]![Re-escalation]![PID] = [forms]![Escnew]![PID]
[forms]![Re-escalation]![Part number] = [forms]![Escnew]![Part number]
[forms]![Re-escalation]![Product Name] = [forms]![Escnew]![Product
Name]
[forms]![Re-escalation]![Version] = [forms]![Escnew]![Version]
[forms]![Re-escalation]![Confirmation ID] =
[forms]![Escnew]![Confirmation
ID]
[forms]![Re-escalation]![Message] = [forms]![Escnew]![Message]
[forms]![Re-escalation]![Error message] = [forms]![Escnew]![Error
message]
[forms]![Re-escalation]![Contract] = [forms]![Escnew]![Contract]
[forms]![Re-escalation]![Authorization number] =
[forms]![Escnew]![Authorization number]
[forms]![Re-escalation]![License number] = [forms]![Escnew]![License
number]
[forms]![Re-escalation]![Enrolment number] =
[forms]![Escnew]![Enrolment
number]
[forms]![Re-escalation]![Quantity] = [forms]![Escnew]![Quantity]
[forms]![Re-escalation]![Program ID] = [forms]![Escnew]![Program ID]
[forms]![Re-escalation]![SAP ID] = [forms]![Escnew]![SAP ID]
[forms]![Re-escalation]![ProductSPLA] = [forms]![Escnew]![ProductSPLA]
[forms]![Re-escalation]![Company] = [forms]![Escnew]![Company]
[forms]![Re-escalation]![Error message] = [forms]![Escnew]![Error
message]
[forms]![Re-escalation]![Error message] = [forms]![Escnew]![Error
message]

End Sub
[/QUOTE]
[/QUOTE][/QUOTE]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top