Calculation Order on a Form and Code Not Running Properly

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My subject line may not accurately describe my problem... I'm using the
following code to evaluate two fields on a form, and then take action based
on the values in those fields. For some reason, on some PC's the code works
perfectly. On others the code does not work, always evaluating a "false"
value in the IF statement and running the "ELSE" portion of the statement -
EXCEPT when in debug mode and stepping through the code. I.e. it doesn't
work on some PC's in "realtime", but does work when stepping through the
code. What is going on? Any thoughts?

Note: the field "SumNonCommitted" is a calculated field, summing values
within the form. This code runs when the field cmb_Month is updated
(AfterUpdate).

If Abs(Me.SumNonCommitted) > 0 And Me.cmb_Month >= #7/1/2004# Then
Me.cmd_ExportExcel.Enabled = False
Me.lbl_ExportExplain.Visible = True
Else
Me.cmd_ExportExcel.Enabled = True
Me.lbl_ExportExplain.Visible = False
End If
 
This sounds like a missing reference...

On a PC where this is not working, go to code view and then select
References from the Tools menu. There will probably be a 'MISSING' reference.
Uncheck this reference and recompile. If the thing referenced is needed then
install and register it (regsvr32) on the problem PC.

If a type library is referenced, but missing Access gets upset and 'forgets'
how to perform ordinary functions such as Date, ABS, etc. The problem will
manifest itself in all sorts of bizarre ways that are completely unrelated to
the real problem.
 
Back
Top