P
Patrice K via AccessMonster.com
I am a beginner to access and need some helpful tips. I have a database for
Purchase orders and I would like for the PO Number to increment and be the
next number in sequence with the PO ID primary key autonumber when the form
opens. I used autonumber data type for PO ID the Primary Key and number data
type for PO Number. I am not sure how to code the sequence function or what
event to put the expression. I tried to use a DMax function but the code
doesn’t look like it is working in Default Value. The #Error will populate
the textbox not a number.
= DMax("PurchaseOrderNumber","Purchase Order")+1
Where "PO Number" is the Field name I want to put the number in, and
"Purchase Order" is the Table name.
The form will be a multiple user form. If I could get the PO Number to
increment with the PO ID I will be almost home with this project. If the DMax
function is not the way to go, any suggestion how to code this form to have
the PO Number move in sequence with the PO ID when the form open to a new
record.
I do appreciate any assistance with this issue.
Thanks
Patrice
Purchase orders and I would like for the PO Number to increment and be the
next number in sequence with the PO ID primary key autonumber when the form
opens. I used autonumber data type for PO ID the Primary Key and number data
type for PO Number. I am not sure how to code the sequence function or what
event to put the expression. I tried to use a DMax function but the code
doesn’t look like it is working in Default Value. The #Error will populate
the textbox not a number.
= DMax("PurchaseOrderNumber","Purchase Order")+1
Where "PO Number" is the Field name I want to put the number in, and
"Purchase Order" is the Table name.
The form will be a multiple user form. If I could get the PO Number to
increment with the PO ID I will be almost home with this project. If the DMax
function is not the way to go, any suggestion how to code this form to have
the PO Number move in sequence with the PO ID when the form open to a new
record.
I do appreciate any assistance with this issue.
Thanks
Patrice