G
Garyth
I have a continuous form which displays a list of invoices.
I am writing some code which will allow you to delete an invoice if it is
still 'to be processed' but not if it has already been processed.
I have put in code on the Before Del Confirm event to check if Me![Invoice#]
is equal to 'xxxx' (The invoice number if a invoice is still to be processed)
and allow the delete if that is the case and not allow the delete if it is
not the case.
My problem is that it seems to only allow the delete if the record below the
one selected is 'xxxx' - I did some testing and checked in the locals window
and when a certain record is selected the values for the variables are that
of the record listed below it !!! How can this be possible ? There is no
other code that I can find that messes with this form at all and I have tried
referring to a number of different controls linked to that record but every
time the local values seem to be for the record below the one selected (And
if it is the last record selected then the values are Null because it is
looking at the New Record line).
Any help would be greatly appreciated.
I am writing some code which will allow you to delete an invoice if it is
still 'to be processed' but not if it has already been processed.
I have put in code on the Before Del Confirm event to check if Me![Invoice#]
is equal to 'xxxx' (The invoice number if a invoice is still to be processed)
and allow the delete if that is the case and not allow the delete if it is
not the case.
My problem is that it seems to only allow the delete if the record below the
one selected is 'xxxx' - I did some testing and checked in the locals window
and when a certain record is selected the values for the variables are that
of the record listed below it !!! How can this be possible ? There is no
other code that I can find that messes with this form at all and I have tried
referring to a number of different controls linked to that record but every
time the local values seem to be for the record below the one selected (And
if it is the last record selected then the values are Null because it is
looking at the New Record line).
Any help would be greatly appreciated.