Is there an auto numbering invoice form or blank template?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to create a form that remains the same except for the number.
The number will be contineous, ie: checks, control batch numbers, invoice
numbers.
 
This rountine will give you the next number for any contineous number in a
table.

NextNum = DMAX("[FieldNameWithNumber]", "Table Name With Number") + 1

The only issue you have to be concerned with is if you are in a multi user
environment, it is possible that two users could get the same number.
 
I've been attempting to do this same thing, with no luck at all. I am
already running another thread (Auto Numbering Primary Key), and tried all of
the recommendations, to no avail.

I know there must be an easy fix, but I am at a loss to do it. I thought I
had a few months to work on the database, create forms, reports, etc., but
that has been shortened to a few weeks - this for someone with only 2 basic
classes of Access.

Please take pity on me, Oh Great Ones!!!

Linda

Klatuu said:
This rountine will give you the next number for any contineous number in a
table.

NextNum = DMAX("[FieldNameWithNumber]", "Table Name With Number") + 1

The only issue you have to be concerned with is if you are in a multi user
environment, it is possible that two users could get the same number.

kko said:
I would like to create a form that remains the same except for the number.
The number will be contineous, ie: checks, control batch numbers, invoice
numbers.
 
How are you trying to do this, Linda? The code I posted will always return
the highest value in the field + 1. Tell me exactly how you are trying to do
this, and maybe we can get it working.

Linda said:
I've been attempting to do this same thing, with no luck at all. I am
already running another thread (Auto Numbering Primary Key), and tried all of
the recommendations, to no avail.

I know there must be an easy fix, but I am at a loss to do it. I thought I
had a few months to work on the database, create forms, reports, etc., but
that has been shortened to a few weeks - this for someone with only 2 basic
classes of Access.

Please take pity on me, Oh Great Ones!!!

Linda

Klatuu said:
This rountine will give you the next number for any contineous number in a
table.

NextNum = DMAX("[FieldNameWithNumber]", "Table Name With Number") + 1

The only issue you have to be concerned with is if you are in a multi user
environment, it is possible that two users could get the same number.

kko said:
I would like to create a form that remains the same except for the number.
The number will be contineous, ie: checks, control batch numbers, invoice
numbers.
 
The last code I used was
NextNum = DMax
("[RECID]" , "tblFARGASmain") + 1

I tried this code on current, on enter and on dirty (not at the same time)
and nothing happened. I am doing this on the Form, not the table.

Linda

Klatuu said:
How are you trying to do this, Linda? The code I posted will always return
the highest value in the field + 1. Tell me exactly how you are trying to do
this, and maybe we can get it working.

Linda said:
I've been attempting to do this same thing, with no luck at all. I am
already running another thread (Auto Numbering Primary Key), and tried all of
the recommendations, to no avail.

I know there must be an easy fix, but I am at a loss to do it. I thought I
had a few months to work on the database, create forms, reports, etc., but
that has been shortened to a few weeks - this for someone with only 2 basic
classes of Access.

Please take pity on me, Oh Great Ones!!!

Linda

Klatuu said:
This rountine will give you the next number for any contineous number in a
table.

NextNum = DMAX("[FieldNameWithNumber]", "Table Name With Number") + 1

The only issue you have to be concerned with is if you are in a multi user
environment, it is possible that two users could get the same number.

:

I would like to create a form that remains the same except for the number.
The number will be contineous, ie: checks, control batch numbers, invoice
numbers.
 
Is [RECID] a number?
If you step through the code in debug mode, after this line executed,
NextNum should contain the highest value of [RECID] + 1. You will have to
assign the value of NextNum to whatever control or variable you want it to be
in.

Linda said:
The last code I used was
NextNum = DMax
("[RECID]" , "tblFARGASmain") + 1

I tried this code on current, on enter and on dirty (not at the same time)
and nothing happened. I am doing this on the Form, not the table.

Linda

Klatuu said:
How are you trying to do this, Linda? The code I posted will always return
the highest value in the field + 1. Tell me exactly how you are trying to do
this, and maybe we can get it working.

Linda said:
I've been attempting to do this same thing, with no luck at all. I am
already running another thread (Auto Numbering Primary Key), and tried all of
the recommendations, to no avail.

I know there must be an easy fix, but I am at a loss to do it. I thought I
had a few months to work on the database, create forms, reports, etc., but
that has been shortened to a few weeks - this for someone with only 2 basic
classes of Access.

Please take pity on me, Oh Great Ones!!!

Linda

:

This rountine will give you the next number for any contineous number in a
table.

NextNum = DMAX("[FieldNameWithNumber]", "Table Name With Number") + 1

The only issue you have to be concerned with is if you are in a multi user
environment, it is possible that two users could get the same number.

:

I would like to create a form that remains the same except for the number.
The number will be contineous, ie: checks, control batch numbers, invoice
numbers.
 
Yes, RECID is a number (long integer). I had originally set it up as an
autonumber, and was advised against that, so I changed it. I will retry the
NextNum code again and debug. Before I do this, though - will debugging
renumber the existing records? The existing records must remain the same, as
they were uploaded to a national database (that REALLY works awful).
Thanks for your help!

Linda

Klatuu said:
Is [RECID] a number?
If you step through the code in debug mode, after this line executed,
NextNum should contain the highest value of [RECID] + 1. You will have to
assign the value of NextNum to whatever control or variable you want it to be
in.

Linda said:
The last code I used was
NextNum = DMax
("[RECID]" , "tblFARGASmain") + 1

I tried this code on current, on enter and on dirty (not at the same time)
and nothing happened. I am doing this on the Form, not the table.

Linda

Klatuu said:
How are you trying to do this, Linda? The code I posted will always return
the highest value in the field + 1. Tell me exactly how you are trying to do
this, and maybe we can get it working.

:

I've been attempting to do this same thing, with no luck at all. I am
already running another thread (Auto Numbering Primary Key), and tried all of
the recommendations, to no avail.

I know there must be an easy fix, but I am at a loss to do it. I thought I
had a few months to work on the database, create forms, reports, etc., but
that has been shortened to a few weeks - this for someone with only 2 basic
classes of Access.

Please take pity on me, Oh Great Ones!!!

Linda

:

This rountine will give you the next number for any contineous number in a
table.

NextNum = DMAX("[FieldNameWithNumber]", "Table Name With Number") + 1

The only issue you have to be concerned with is if you are in a multi user
environment, it is possible that two users could get the same number.

:

I would like to create a form that remains the same except for the number.
The number will be contineous, ie: checks, control batch numbers, invoice
numbers.
 
Any code that would make changes to data will make the same changes in debug
mode. You can either comment those lines out or when you get to a line that
modifies data and you don't want to, put the cursor on the next line you want
to execute, the select Set Next Statement from the Debug menu.

And, what are you doing testing in a production database? Shame on you! :)

Linda said:
Yes, RECID is a number (long integer). I had originally set it up as an
autonumber, and was advised against that, so I changed it. I will retry the
NextNum code again and debug. Before I do this, though - will debugging
renumber the existing records? The existing records must remain the same, as
they were uploaded to a national database (that REALLY works awful).
Thanks for your help!

Linda

Klatuu said:
Is [RECID] a number?
If you step through the code in debug mode, after this line executed,
NextNum should contain the highest value of [RECID] + 1. You will have to
assign the value of NextNum to whatever control or variable you want it to be
in.

Linda said:
The last code I used was
NextNum = DMax
("[RECID]" , "tblFARGASmain") + 1

I tried this code on current, on enter and on dirty (not at the same time)
and nothing happened. I am doing this on the Form, not the table.

Linda

:

How are you trying to do this, Linda? The code I posted will always return
the highest value in the field + 1. Tell me exactly how you are trying to do
this, and maybe we can get it working.

:

I've been attempting to do this same thing, with no luck at all. I am
already running another thread (Auto Numbering Primary Key), and tried all of
the recommendations, to no avail.

I know there must be an easy fix, but I am at a loss to do it. I thought I
had a few months to work on the database, create forms, reports, etc., but
that has been shortened to a few weeks - this for someone with only 2 basic
classes of Access.

Please take pity on me, Oh Great Ones!!!

Linda

:

This rountine will give you the next number for any contineous number in a
table.

NextNum = DMAX("[FieldNameWithNumber]", "Table Name With Number") + 1

The only issue you have to be concerned with is if you are in a multi user
environment, it is possible that two users could get the same number.

:

I would like to create a form that remains the same except for the number.
The number will be contineous, ie: checks, control batch numbers, invoice
numbers.
 
Not sure what your answer was, LOL
I am definitely not a programmer! I took a Paradox database that we had
decommissioned in 2001 and had it brought out of mothballs. After routing it
through Excel to get rid of the paradox limitations, I imported the info into
Access, changed some of the column types and added descriptions. We are
going to keep our own regional database going as the National database
(Oracle) allows us to put (selected) info in, but not query it out. In 2
years, that database will be shut down and an even larger database will take
its place, so we fear that we will never be able to use it for our needs. We
have no control over the national database.

Thats my story and I'm stickin' to it!

Linda

Klatuu said:
Any code that would make changes to data will make the same changes in debug
mode. You can either comment those lines out or when you get to a line that
modifies data and you don't want to, put the cursor on the next line you want
to execute, the select Set Next Statement from the Debug menu.

And, what are you doing testing in a production database? Shame on you! :)

Linda said:
Yes, RECID is a number (long integer). I had originally set it up as an
autonumber, and was advised against that, so I changed it. I will retry the
NextNum code again and debug. Before I do this, though - will debugging
renumber the existing records? The existing records must remain the same, as
they were uploaded to a national database (that REALLY works awful).
Thanks for your help!

Linda

Klatuu said:
Is [RECID] a number?
If you step through the code in debug mode, after this line executed,
NextNum should contain the highest value of [RECID] + 1. You will have to
assign the value of NextNum to whatever control or variable you want it to be
in.

:

The last code I used was
NextNum = DMax
("[RECID]" , "tblFARGASmain") + 1

I tried this code on current, on enter and on dirty (not at the same time)
and nothing happened. I am doing this on the Form, not the table.

Linda

:

How are you trying to do this, Linda? The code I posted will always return
the highest value in the field + 1. Tell me exactly how you are trying to do
this, and maybe we can get it working.

:

I've been attempting to do this same thing, with no luck at all. I am
already running another thread (Auto Numbering Primary Key), and tried all of
the recommendations, to no avail.

I know there must be an easy fix, but I am at a loss to do it. I thought I
had a few months to work on the database, create forms, reports, etc., but
that has been shortened to a few weeks - this for someone with only 2 basic
classes of Access.

Please take pity on me, Oh Great Ones!!!

Linda

:

This rountine will give you the next number for any contineous number in a
table.

NextNum = DMAX("[FieldNameWithNumber]", "Table Name With Number") + 1

The only issue you have to be concerned with is if you are in a multi user
environment, it is possible that two users could get the same number.

:

I would like to create a form that remains the same except for the number.
The number will be contineous, ie: checks, control batch numbers, invoice
numbers.
 
Ok, tried to add the code on open, then debug, received this error message:
compile error Argument not optional

Linda

:

Any code that would make changes to data will make the same changes in debug
mode. You can either comment those lines out or when you get to a line that
modifies data and you don't want to, put the cursor on the next line you want
to execute, the select Set Next Statement from the Debug menu.

And, what are you doing testing in a production database? Shame on you! :)

Linda said:
Yes, RECID is a number (long integer). I had originally set it up as an
autonumber, and was advised against that, so I changed it. I will retry the
NextNum code again and debug. Before I do this, though - will debugging
renumber the existing records? The existing records must remain the same, as
they were uploaded to a national database (that REALLY works awful).
Thanks for your help!

Linda

Klatuu said:
Is [RECID] a number?
If you step through the code in debug mode, after this line executed,
NextNum should contain the highest value of [RECID] + 1. You will have to
assign the value of NextNum to whatever control or variable you want it to be
in.

:

The last code I used was
NextNum = DMax
("[RECID]" , "tblFARGASmain") + 1

I tried this code on current, on enter and on dirty (not at the same time)
and nothing happened. I am doing this on the Form, not the table.

Linda

:

How are you trying to do this, Linda? The code I posted will always return
the highest value in the field + 1. Tell me exactly how you are trying to do
this, and maybe we can get it working.

:

I've been attempting to do this same thing, with no luck at all. I am
already running another thread (Auto Numbering Primary Key), and tried all of
the recommendations, to no avail.

I know there must be an easy fix, but I am at a loss to do it. I thought I
had a few months to work on the database, create forms, reports, etc., but
that has been shortened to a few weeks - this for someone with only 2 basic
classes of Access.

Please take pity on me, Oh Great Ones!!!

Linda

:

This rountine will give you the next number for any contineous number in a
table.

NextNum = DMAX("[FieldNameWithNumber]", "Table Name With Number") + 1

The only issue you have to be concerned with is if you are in a multi user
environment, it is possible that two users could get the same number.

:

I would like to create a form that remains the same except for the number.
The number will be contineous, ie: checks, control batch numbers, invoice
numbers.
 
Back
Top