I had posted this in forms but maybe I need todo something in VBA..
I'm working on a small system that I need to change.
The user can make an order by clicking on a button after selecting a client. He is taken to a screen/form with details about the client. In a subform there is a blank order. Within the subform he then selects an order template and clicks a copy button and a query in the click event appends the order template data to a suborder table. The user can then go ahead and change fields and these changes are reflected in the suborder table. There is one field that he can not update that contains effectively the sort order of the copied template lets call this strSortOrder. The user can delete and add extra items.He can change the visual order as well. Once complete I want to be able to preserve this visual order for further forms, reports and printouts. After googling this to death the only sensible way forward is to use the row number itself. This has been quite challenging in itself but I have managed to find some code that works well. The only problem I have now is updating strSortOrder. I have managed to display it in an unbound field. So I have
Item-A-ROW1 price-A-ROW-1 quantity-A-row-1 strSortorder-A-ROW1 unboundfieldROW1
Item-B-ROW2 price-B-ROW-2 quantity-B-row-3 strSortorder-B-ROW2 unboundfieldROW2
Item-C-ROW2 price-C-ROW-3 quantity-C-row-3 strSortorder-C-ROW3 unboundfieldROW4
Item-D-ROW4 price-D-ROW-4 quantity-D-row-4 strSortorder-D-ROW4 unboundfieldROW4
Item-E-ROW5 price-E-ROW-5 quantity-E-row-5 strSortorder-E-ROW5 unboundfieldROW5
The field unboundfieldROW1 contains 1 unboundfieldROW2 contains 2 up to unboundfieldROW5 containing5.
I want strSortorder-E-ROWn = unboundfieldROWn
I can get this (almost) to work using a before update event BUT ONlY IF the user changes something on a particular row. I need it to work on any row that is unchanged as well. In fact the user does't need to change anything anyway.
Any help appreciated.
I'm working on a small system that I need to change.
The user can make an order by clicking on a button after selecting a client. He is taken to a screen/form with details about the client. In a subform there is a blank order. Within the subform he then selects an order template and clicks a copy button and a query in the click event appends the order template data to a suborder table. The user can then go ahead and change fields and these changes are reflected in the suborder table. There is one field that he can not update that contains effectively the sort order of the copied template lets call this strSortOrder. The user can delete and add extra items.He can change the visual order as well. Once complete I want to be able to preserve this visual order for further forms, reports and printouts. After googling this to death the only sensible way forward is to use the row number itself. This has been quite challenging in itself but I have managed to find some code that works well. The only problem I have now is updating strSortOrder. I have managed to display it in an unbound field. So I have
Item-A-ROW1 price-A-ROW-1 quantity-A-row-1 strSortorder-A-ROW1 unboundfieldROW1
Item-B-ROW2 price-B-ROW-2 quantity-B-row-3 strSortorder-B-ROW2 unboundfieldROW2
Item-C-ROW2 price-C-ROW-3 quantity-C-row-3 strSortorder-C-ROW3 unboundfieldROW4
Item-D-ROW4 price-D-ROW-4 quantity-D-row-4 strSortorder-D-ROW4 unboundfieldROW4
Item-E-ROW5 price-E-ROW-5 quantity-E-row-5 strSortorder-E-ROW5 unboundfieldROW5
The field unboundfieldROW1 contains 1 unboundfieldROW2 contains 2 up to unboundfieldROW5 containing5.
I want strSortorder-E-ROWn = unboundfieldROWn
I can get this (almost) to work using a before update event BUT ONlY IF the user changes something on a particular row. I need it to work on any row that is unchanged as well. In fact the user does't need to change anything anyway.
Any help appreciated.