"me" keyword error while compile

  • Thread starter Thread starter -Obama
  • Start date Start date
O

-Obama

I tried to compile codes in module access97:

....
Me.RefreshAcct
....



It gives me an error:

Compile error:

Invalid use of Me Keyword.


Can anyone please help? Thanks.
 
Suggestions

1. Is this in the module of a form or report?
It will not work in a stand-alone module.

2. What is RefreshAcct?
If it is a field in the form's RecordSource (not a control on the form), you
may be able to solve the problem by replacing the dot with a bang:
Me!RefreshAcct
Alternatively, add a text box for the control, so it does refer to a control
and not merely an AccessField.

3. What else is on the line?
That line is not enough. Sometimes the problem can be further along the line
than the bit that Access highlights as the problem.
 
Back
Top