scouser
Registered User.
- Local time
- Today, 22:39
- Joined
- Nov 25, 2003
- Messages
- 767
Guys I have been having a dabble but am unsure how to proceed. I currently have a tblOrders, OrderID = AutoNumber. I have added a field 'OrderNumber'. I want to set the initial value of OrderNumber to 1000. I have butchered some code:Module modSetNum (No Laughing!!)
Right how do I get the above to work? I will need to amend my order form to show the OrderNumber not current OrderID field. I have no idea how to call the module to set the value for my OrderNumber!! (or if the module code actually works!!!)
Cheers,
Phil.

Code:
Public Sub SetNum ()
Dim dblOrderNo As Double
Dim dblEnquiryNo As Double
dblOrderNo = Nz(DMax("InvoiceNo", "tblInvoice") + 1, "1000")
dblEnquiryNo = Nz(DMax("InvoiceNo", "tblInvoice") + 1, "1000")
End Sub
Right how do I get the above to work? I will need to amend my order form to show the OrderNumber not current OrderID field. I have no idea how to call the module to set the value for my OrderNumber!! (or if the module code actually works!!!)
Cheers,
Phil.