N
niuginikiwi
Hi I have two tables tblOrders and tblOrderDetails. Two forms are based on
these tables called frmOrders and frmOrderDetailsSubform respectively.
The 2nd form is a subform as datasheet view on frmOrders.
I have a text field called LineNo in the subform with a combo box with
RowSourceType = Value List and RowSource = 01;02;03;04 up to 40.
What happens is one an order line is entered a LineNo is selected and that
is selected in the order of 01 to 20 or 30 whatever the last orderline is.
But on some ocassion one OrderLine needs to be deleted. For Example, there
were 10 order lines and line 07 was to be deleted. If deleted it leaves a gap
(01 - 06, no 07 then 08 -10)
Because I would like the LineNo from 01 up to whatever without any gaps like
that, I have a button on the main form called btnRefresh.
Once I click this button I would like the LineNo field to count how many
Order Line records are there and reassign 01 up to whatever the last number
the Order Line record is.
Can any or does any one have any idea on how to code my btnRefresh onclick
event to do just that?
In otherwords, the users can carry on making order lines and not worry about
LineNo field until in the end when they can press btnRefresh which should
fill out the LineNo in sequence for them.
Any help would be much appreciated.
Thanks.
these tables called frmOrders and frmOrderDetailsSubform respectively.
The 2nd form is a subform as datasheet view on frmOrders.
I have a text field called LineNo in the subform with a combo box with
RowSourceType = Value List and RowSource = 01;02;03;04 up to 40.
What happens is one an order line is entered a LineNo is selected and that
is selected in the order of 01 to 20 or 30 whatever the last orderline is.
But on some ocassion one OrderLine needs to be deleted. For Example, there
were 10 order lines and line 07 was to be deleted. If deleted it leaves a gap
(01 - 06, no 07 then 08 -10)
Because I would like the LineNo from 01 up to whatever without any gaps like
that, I have a button on the main form called btnRefresh.
Once I click this button I would like the LineNo field to count how many
Order Line records are there and reassign 01 up to whatever the last number
the Order Line record is.
Can any or does any one have any idea on how to code my btnRefresh onclick
event to do just that?
In otherwords, the users can carry on making order lines and not worry about
LineNo field until in the end when they can press btnRefresh which should
fill out the LineNo in sequence for them.
Any help would be much appreciated.
Thanks.