locked
User Logging RRS feed

  • Question

  • Hi everyone,

    I have been using the same code to track user activity on several projects without any issues but suddenly it has developed a compile error saying sub or function not defined.

    Here is the code;

    Private Sub Form_Load()
        LogEvent = "Form opened: " & Me.Name
        LogEvt
    End Sub

    This still works on my other projects, it is just this current project that it has issues with, any thoughts as to what might be causing a problem?

    Thank you in advance.

    Kind Regards

    Richard

    Friday, May 18, 2018 4:25 PM

Answers

  • Hi,

    I have fixed it, the module didnt copy over, I feel so stupid now. 

    Thank you.

    A red faced Richard

    • Marked as answer by R.Nock Friday, May 18, 2018 4:51 PM
    Friday, May 18, 2018 4:51 PM

All replies

  • Hi Richard,

    Maybe you have a corrupted form. You could try exporting the form to a new database, delete the old one, and then import the copy back. Or maybe simply copy a new one from a backup file.

    Just a thought...

    Friday, May 18, 2018 4:36 PM
  • Hi,

    Unfortunately it didn't work.

    Kind Regards

    Richard

    Friday, May 18, 2018 4:42 PM
  • Wait, did you have a backup? If so, does the backup also produces an error? If so, what happens if you delete the code and then recreate it?

    Just curious...

    Friday, May 18, 2018 4:43 PM
  • Hi,

    I have fixed it, the module didnt copy over, I feel so stupid now. 

    Thank you.

    A red faced Richard

    • Marked as answer by R.Nock Friday, May 18, 2018 4:51 PM
    Friday, May 18, 2018 4:51 PM
  • LOL. Live and learn. Good luck with your project.
    Friday, May 18, 2018 4:52 PM
  • thanks.
    Friday, May 18, 2018 4:52 PM
  • We probably would have figured it out if I asked you which line was highlighted when you debug the code.

    I didn't notice you had a call to a function in your code.

    Cheers!

    Friday, May 18, 2018 4:55 PM