473,396 Members | 2,011 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,396 software developers and data experts.

Can't compile anything????

Maybe it's not me. I posted a question earlier about not getting a
function call right. Well, now I'm trying to write some very simple
code, and I can't get ANYTHING to work. It won't even display a
simple message box...

Same form I had in my previous post. It's got about 10 fields on it.
It is linked right to the table containing the data, no queries or
anything. It's data entry property is set to yes. It's used to input
info about a pacemaker implant. One of the fields is the doctor that
did the surgery. It's a list box containing all available docs, but I
want a double-click event to open the doctors form in data entry mode
to add new docs, should one come on board.

EVERY BIT OF CODE I have written gives me this error:

The expression On Dbl Click you entered as the event property setting
produced the following error: Event procedure declaration does not
match description of event having same name.

This is the error I have gotten all day for everything I've written.
So, I created a button for the form to open doc's form, same message.
I changed the dbl-click event for that field to just display a msgbox
saying "test" but it won't even do that. I thought maybe because the
form is data-entry, nope. I thought maybe because the field is a list
box, nope. I wrote test code for other fields on the form, nothing.
I closed the whole program and reopened it, nothing. In the debug
window it says it can't compile the code.

I'm out of ideas. If the buttons that Access creates itself don't
even work, what am I supposed to do???? Code that used to work, gave
me an error this morning so I removed it, because it wasn't
needed...but looking back now, nothing has worked in this database yet
today.

Here's my code, just in case (I removed the error trapping code,
thinking that might have something to do with it. Of course, it
didn't help):

Private Sub fldDocName_DblClick(Cancel As Integer)

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmDoctors"
DoCmd.OpenForm stDocName

End Sub
Nov 12 '05 #1
2 2290
"Donna Sabol" <ds********@yahoo.com> wrote in message
news:e8**************************@posting.google.c om...
The expression On Dbl Click you entered as the event property setting
produced the following error: Event procedure declaration does not
match description of event having same name.
I'm out of ideas. If the buttons that Access creates itself don't
even work, what am I supposed to do????
The problem is that you are changing the values being passed:
Private Sub fldDocName_DblClick(Cancel As Integer)
When, where, how ,and did you decide to add the "Cancel as Integer"? Fact
is, the click event, the double click event, and in fact most events for
that matter do NOT have a provisions for adding Cancel As Integer. When you
use code, it must match EXACTLY what the call system need.

The above should be:

Private Sub fldDocName_DblClick()
For, take a second to read what that error message says:
Event procedure declaration does not

match description of event having same name.

In other words, what you are declaration does "NOT MATCH the description"
of the event. In the above, someone obviously came along, and decided
to modify the description of the function. You most certainly free to
add, slice , dice the code in the procedure...but you MUST MATCH the
declaration (exactly as the error message states).

Try just placing a test button on the form, and use the click event with the
code:

msgbox "hello how are you"

Note VERY carefully how the code is written, and not how there is NO cancel
in the declaration. You can not go around willy nilly changing the
declaration of the function
If you DO CHANGE the declaration of the function, you will get a message
telling you
that your declaration DOES NOT match the description.

Likely you had some code, and cut and paste, or simply tried to modify the
name. I would suggest that when you use cut and paste, do NOT copy the
function name, but only the code inside. Always let ms-access make/set the
function name description for you.
--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
pl******************@msn.com
http://www.attcanada.net/~kallal.msn

Nov 12 '05 #2
Perhaps I'm being hasty, but did you try importing your form into a
new DB and see if that helped? Sounds like something's corrupted.
Either that or is some library marked MISSING when you check
references after a compile?
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: thumb_42 | last post by:
Just curious and I haven't really seen anything about this anywhere. Is there an explanation of the stages PHP goes through in compiling -vs- parsing a PHP script? google resulted in lots of...
2
by: Hal Vaughan | last post by:
I've noticed that when I'm fine tuning a class, I seem to get a quick compile time. Then, if I have to compile another class with a change, it takes much longer to compile. The next time I...
2
by: hykim | last post by:
I want to call a unmanaged dll's function returning some STRUCT's pointer. the next is definition of a STRUCT. ----------------------------------------------------------------------- typedef...
17
by: gg | last post by:
how can one compile vb code into dll? The vstdio build project it tends to build exe. When I looked at the build in help I did not find anything about configuring for DLL. I even try custom...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
8
by: Edward Diener | last post by:
By reuse, I mean a function in an assembly which is called in another assembly. By a mixed-mode function I mean a function whose signature has one or more CLR types and one or more non-CLR...
13
by: PW | last post by:
Hi, This is bizarre. I've check and rechecked the spelling, cut and paste the name of the form (when trying to rename the form) and the control yet I still get a parameter prompt when the form...
3
by: NvrBst | last post by:
Right now I have C99 code in .c extensions. I compile it in VSC++ and it complains about a lot of errors. I change the extensions to .cpp and compile in VSC++ and it succeeds. Is there a way...
4
by: Salad | last post by:
I have a database called MyApp.MDB. When I go into a module and want to compile the thing, it might have, on the menu bar line "Compile MyAppTest". IOW, the app name it's about to compile does...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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,...

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.