add 1 to an order number based on ordertype combobox

G

Guest

Good Day,

I have a form that I use for order entries (based on my tblorders), and I
have a combobox with three types of orders, Custom, Stock, and Sample. What I
am trying to accomplish is a sequencial order number system so that if the
user selects "Custom" and the last order number was 2 then the next order
number would be 3. Or if the user selects "Program" and the last order number
was 7, then the next order number would be 8.


Any ideas? Tips? or suggestions are greatly appreciated..

Brook
 
M

Mike Painter

Brook said:
Good Day,

I have a form that I use for order entries (based on my tblorders),
and I have a combobox with three types of orders, Custom, Stock, and
Sample. What I am trying to accomplish is a sequencial order number
system so that if the user selects "Custom" and the last order number
was 2 then the next order number would be 3. Or if the user selects
"Program" and the last order number was 7, then the next order number
would be 8.


Any ideas? Tips? or suggestions are greatly appreciated..

Brook
A table with two fields
field 1 field 2
Custom xxx
Stock yyy
Sample zzz

Use dLookup to find the number, then an INSERT INTO to set the new value.

There is no need to do this and it may cause problems in some cases.
If the order header contains the custom, stock, sample code then a query
will tell you what you need.
If the line item contains it you can ship samples on the same order.
 

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

Top