473,405 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Error: Expression On Click you entered as the event property..

294 256MB
"The expression On Click you entered as the event property setting produced the following error: Procedure declaration does not match description of event or procedure having the same name."

That's the error I am receiving when I am trying to click a button, on a bound form to a table, that executes this code:

Expand|Select|Wrap|Line Numbers
  1. Private Sub HomeBtn_Click()
  2.  
  3. Call ElectionAwardUpdate
  4.  
  5. DoCmd.Close acForm, Me.Name
  6. DoCmd.OpenForm "Home"
  7.  
  8. End Sub
The "Call ElectionAwardUpdate" is a Module, and here is the code:

Expand|Select|Wrap|Line Numbers
  1. Public Sub ElectionAwardUpdate()
  2.  
  3.     'update non-identifying foreign key to reflect new elections
  4.     DoCmd.SetWarnings False
  5.         DoCmd.OpenQuery "UpdateAwardPriElectionQry"
  6.         DoCmd.OpenQuery "UpdateAwardSecElectionQry"
  7.     DoCmd.SetWarnings True
  8.  
  9. End Sub
  10.  
Does anyone know how to get rid of this error: I did some Googling and tried to Import all objects into a new database, Compact & Repair, comment out certain lines of code. Nothing worked.

Any ideas? Thank you.
Apr 10 '14 #1
2 10183
jimatqsi
1,271 Expert 1GB
mcupito,
Go double-check the property setting for the click event on the button or object that got clicked. I've fat-fingered that before and accidentally changed [Event Procedure] to some other choice on the drop-down list for the event.

Jim
Apr 10 '14 #2
mcupito
294 256MB
I got fed up with it, so I just created a new form. Not quite sure where the error was coming from, to be honest.

I pasted the same VBA behind the form without any errors and everything works. It must have been corrupted somehow.

Anyway, thanks for the reply, Jim.
Apr 10 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: belzibob | last post by:
I have an Access 2000 MDE that I can deploy via Wise 9.0 for Windows script successfully to 95/98, NT, 2000, XP, Xp/pro, and Me. This works fine in all environments on any number of pc's so I am...
3
by: CLarkou | last post by:
On a client's machine with Office 97, my access program gives an error "The Expression you entered refers to an object that is closed or doesn't exist" when I am assigning a value in the checkbox....
2
by: MLH | last post by:
A form named frmVehicleEntryForm has a number of textbox controls who's OnGotFocus property setting is an expression... =Change2Green() Change2Green() looks something like this... Dim MyControl...
1
by: sumit205 | last post by:
Error 2467:The Expression you entered refers to an object that is closed or doesn't exist . DoCmd.OpenForm frm2, WindowMode:=acDialog, OpenArgs:="c" & NewProductID In the debig mode when i...
4
by: MLH | last post by:
I have an error #2473. I don't think it is related to References. I rolled out an A97 mde file that runs on several machines - but gives me this error on one workstation??? Here's the error: ...
6
by: weston | last post by:
In Access 2000 I have a form with a tab control with 3 tabs. I have a button that is supposed to check if each question on the form has been completed. The code that is under this button is below. It...
2
by: shalskedar | last post by:
I 've created Report in Ms access which contains subform.The field value in the report is retrieved from the subform.When this report is exported,it shows the error as The expression you entered has...
1
by: Steven Hayes | last post by:
I am trying to convert this excel expression into an Access expression: =IF(OR(B79="",B62="", H7=""),"Required Fields Incomplete",IF(AND(F87<20000,OR(J87>P14, B87>P37)),"Yes, this is a HIGH COST...
4
reginaldmerritt
by: reginaldmerritt | last post by:
Wasn't sure about the title for this topic. I have a continuous form with a list of records. I use a button next to each record to view the selected record in more detail. So that's one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.