Macro fails when used to modify existing value

  • Thread starter Thread starter CW
  • Start date Start date
C

CW

On my invoicing page I have a macro that runs when a Tax Type is selected,
and it looks up the applicable tax rate and this is then used to calculate
the tax amount based on the net charge amount and create the gross charge
amount.

It works absolutely fine when used the first time round i.e. when first
creating a particular invoice.

However if we then go back into that invoice and need to edit the Tax Type
(perhaps the user got it wrong) then the macro fails as soon as the combo to
choose a different Tax Type is used. We have to hit Halt twice in the dialog
boxes that appear and then nothing has been calculated.

What can the problem be??
Thanks
CW
 
Bonnie -
The macro Set Value is this:
Forms]![frmInvoiceLines].[Form]![InvLine1TaxRate]
and the Expression is this
DLookUp("TaxRate","TaxTypes","[Forms]![frmInvoiceLines]![InvLine1TaxCode]=[TaxTypes]![TaxCode]")
There's nothing else running at all, it's a very simple form with just 4 or
5 controls on it.
Just to reiterate - it works absolutely fine first time round, it's just if
we come back later to modify the TaxType, that's when it doesn't want to play
any more...
Thanks
CW
 
Back
Top