Having the Next Incremantal number as the Default value

G

Guest

Hi from Oklahoma!!

I am relatively new to ACCESS and I am needing help with a problem where I
am trying to build a Form to input new Purchase Orders (PO) for my company.

Basically, my PO numbers are just incremental numbers that are currently at
"17000" so I have a form to input new PO's and it works fine but I want it to
default to the next PO# availble as this case would be "17001" instead of the
person looking up that the last number was "17000" and adding one to it. I
have tried a "Select statement" that is a SQL version of a "Max(PO#) + 1"
script that runs correctly as a stand alone query and gets me next number
available. BUT when I transfer this (select statement) to the "Default
Value" of the PO# field on the PO input form I just get "#Name?" in the PO#
field.

I know this is probably very simple and I am probably going at this all
wrong, but any assistance or help would be greatly appreciated.

And as always, THANKS IN ADVANCE!!!!
Chip
 
G

Guest

As you are from Oklahoma, I will type very slowly so you will understand :)
Put this in the Default Value property of your PO number control.

Nz(DMax("[PO#]", "POTable"), 0) + 1

One other thing, avoid using charachters like # in naming. It is best to
use only Letters, Numbers, and the underscore _

So how long did it take to figure out I am from Texas :)
 
G

Guest

THANKS!!!
Worked Great!!!

Oh and thanks for typing slow, it helped with my "Redneck Translation" ;)

THANKS AGAIN!!!!

Klatuu said:
As you are from Oklahoma, I will type very slowly so you will understand :)
Put this in the Default Value property of your PO number control.

Nz(DMax("[PO#]", "POTable"), 0) + 1

One other thing, avoid using charachters like # in naming. It is best to
use only Letters, Numbers, and the underscore _

So how long did it take to figure out I am from Texas :)



Chip said:
Hi from Oklahoma!!

I am relatively new to ACCESS and I am needing help with a problem where I
am trying to build a Form to input new Purchase Orders (PO) for my company.

Basically, my PO numbers are just incremental numbers that are currently at
"17000" so I have a form to input new PO's and it works fine but I want it to
default to the next PO# availble as this case would be "17001" instead of the
person looking up that the last number was "17000" and adding one to it. I
have tried a "Select statement" that is a SQL version of a "Max(PO#) + 1"
script that runs correctly as a stand alone query and gets me next number
available. BUT when I transfer this (select statement) to the "Default
Value" of the PO# field on the PO input form I just get "#Name?" in the PO#
field.

I know this is probably very simple and I am probably going at this all
wrong, but any assistance or help would be greatly appreciated.

And as always, THANKS IN ADVANCE!!!!
Chip
 
G

Guest

Glad I could help, Chip.

Chip said:
THANKS!!!
Worked Great!!!

Oh and thanks for typing slow, it helped with my "Redneck Translation" ;)

THANKS AGAIN!!!!

Klatuu said:
As you are from Oklahoma, I will type very slowly so you will understand :)
Put this in the Default Value property of your PO number control.

Nz(DMax("[PO#]", "POTable"), 0) + 1

One other thing, avoid using charachters like # in naming. It is best to
use only Letters, Numbers, and the underscore _

So how long did it take to figure out I am from Texas :)



Chip said:
Hi from Oklahoma!!

I am relatively new to ACCESS and I am needing help with a problem where I
am trying to build a Form to input new Purchase Orders (PO) for my company.

Basically, my PO numbers are just incremental numbers that are currently at
"17000" so I have a form to input new PO's and it works fine but I want it to
default to the next PO# availble as this case would be "17001" instead of the
person looking up that the last number was "17000" and adding one to it. I
have tried a "Select statement" that is a SQL version of a "Max(PO#) + 1"
script that runs correctly as a stand alone query and gets me next number
available. BUT when I transfer this (select statement) to the "Default
Value" of the PO# field on the PO input form I just get "#Name?" in the PO#
field.

I know this is probably very simple and I am probably going at this all
wrong, but any assistance or help would be greatly appreciated.

And as always, THANKS IN ADVANCE!!!!
Chip
 

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

Similar Threads


Top