CINQUEFOIL22
Registered User.
- Local time
- Today, 08:02
- Joined
- Jun 8, 2010
- Messages
- 26
Here is my question, I hope I can explain it so you understand.
I have a table in my database "TblPurchaseOrder". From that I created a form "FrmPurchaseOrder" that opens in datasheet view in add only mode for people to enter in the product to be ordered on that purchase order. I currently have a code in there:
Me.PONumber = Nz(DMax("Val([PONumber])", "TblPurchaseOrder")) + 1
It works wonderfully, when I click that field the number increases. But here is my problem, I want the increase, but only on each new open. Our purchase orders can have multiple lines. Each time the form is opened it would be for a new purchase order and I need that purchase order number to stay the same for each line during that opening of the form.
Can anyone help me?
I have a table in my database "TblPurchaseOrder". From that I created a form "FrmPurchaseOrder" that opens in datasheet view in add only mode for people to enter in the product to be ordered on that purchase order. I currently have a code in there:
Me.PONumber = Nz(DMax("Val([PONumber])", "TblPurchaseOrder")) + 1
It works wonderfully, when I click that field the number increases. But here is my problem, I want the increase, but only on each new open. Our purchase orders can have multiple lines. Each time the form is opened it would be for a new purchase order and I need that purchase order number to stay the same for each line during that opening of the form.
Can anyone help me?