Results 1 to 7 of 7
  1. #1
    CHEECO is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Posts
    156

    Expression on click error

    Hello again

    I have a calendar / appointment database that added to another database that I have. After moving all the forms and queries and so on to my data base I am getting the below error on many of the button for the calendar / appointment database.


    Click image for larger version. 

Name:	BAD ERROR.jpg 
Views:	14 
Size:	165.6 KB 
ID:	24354

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    sounds like you defined something as string but used is as integer.
    or tried to assign it as an object....

    something like that.
    try hitting CTL-break after the message, and see if it shows you.

  3. #3
    CHEECO is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Posts
    156
    No it does not show me. It just closes the error message. I never changed any code. I just used the external data to copy the files over and then it did not work anymore.

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    these are the hardest to find.
    somewhere in form load, or oncurrent, it is assinging something
    check all the declarations and make sure they are the correct data types.

  5. #5
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,741
    If you carefully read the error description it is saying that the name of the command button clicked does not match the name of the event procedure it is connected to.
    For example, if the command button is named 'Next', the expected event procedure is named 'Next_Click()'.

  6. #6
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    One possibility is that although you moved your forms, queries etc to another database, you forgot to move a code module.

    In the forms that are generating the errors, what are the settings for the On-Click event property? Do they refer to a function? If they do, did you transfer the code for the function to the new database?

  7. #7
    CHEECO is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2016
    Posts
    156
    Good advice from all. I will look into these suggestion and get back to you all.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Expression On Click Error within a Form
    By johnson8809 in forum Access
    Replies: 1
    Last Post: 02-09-2015, 01:53 PM
  2. Replies: 11
    Last Post: 05-01-2014, 11:56 AM
  3. Replies: 11
    Last Post: 03-31-2014, 03:15 AM
  4. Replies: 6
    Last Post: 05-30-2012, 12:32 PM
  5. Replies: 1
    Last Post: 05-11-2012, 10:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums