Using attached database. Open Form "DH ADD ORDERS w/Tax". I would like to autopopulate the bound control "INVNUM". It's source would be the field INVNUM in the table INVOICE.
I was hoping to use a SetValue Macro, using a DMAX expression to set the value.
Problem is that INVOICE contains some very old INVNUM above 900,000. I want to pick up where the current INVNUM end at 46822, so my next INVNUM would be 46823.
I think I need to couple a Where statement in my expression, but am not sure how to do it.
In essence it would say, "Set Value of INVNUM on the form at a value one greater than the greatest INVNUM in the Table INVOICE that is below 900,000.
Any suggestions?
Thanks
I was hoping to use a SetValue Macro, using a DMAX expression to set the value.
Problem is that INVOICE contains some very old INVNUM above 900,000. I want to pick up where the current INVNUM end at 46822, so my next INVNUM would be 46823.
I think I need to couple a Where statement in my expression, but am not sure how to do it.
In essence it would say, "Set Value of INVNUM on the form at a value one greater than the greatest INVNUM in the Table INVOICE that is below 900,000.
Any suggestions?
Thanks
Comment