I have a similar problem with an append query. I am creating new order records in a table based on a table of purchase orders imported from a customer. Some of the orders are sales of goods, and some are sales of services.
All of them are assigned work order numbers (an autonumber field) but only the sales of services are assigned an rma number. Previously, all of these orders were hand-entered and an RMA was chosen on a form when needed, but the volume is growing to the point where that is no longer practical.
How can I conditionally increment each record? In other words, for each record being created, if POType="repair", RMA=DMax("[RMA]","WorkOrders"+1, without having it return the same RMA number for all records in the query?
I figured out the answer to my own problem: use the GetRows Method to populate an array from a SQL statement with the conditions I need, then loop through the array. I knew there had to be a way to do it. It just seems I can't do it in the append query.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.