I have two tables “tblSalesOrder” and “tblSalesOrderInvoice”, That I have to compare two max values.
The values to be compared are “SalesOrderNumber” and “SOInvoiceNumber”.
After the two max values have been compared I need the higher of the two to be placed into a field.
Some along the lines of
When entering data into the SalesOrder Form
IIf(DMax([tblSalesOrder].[SalesOrderNumber]<[tblSalesOrderInvoice]. [SOInvoviceNumber]),[tblSalesOrder].[SalesOrderNumber]+1,[tblSalesOrderInvoice]. [SOInvoiceNumber]+1)
After a Sales Order is process some of the data will be appended to the “SalesOrderInvoice” table with
a ship date as the Invoive date. And some to the “SalesOrder” table as a back order.
This is done until the customers Purchase Order is complete.
When entering data into the SalesOrderInvoice Form (this is not done very much, maybe 24 times a year)
I need to find the max value between the two tables and place it in the “SOInvoiceNumber” field.
Could someone point me in the direction of getting this acomplished.