473,799 Members | 3,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_DblC lick(Cancel As Integer)

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmDoctors "
DoCmd.OpenForm stDocName

End Sub
Nov 12 '05 #1
2 2304
"Donna Sabol" <ds********@yah oo.com> wrote in message
news:e8******** *************** ***@posting.goo gle.com...
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_DblC lick(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_DblC lick()
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
6911
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 pages about how to compile PHP itself, but couldn't find anything about the stages of php "compilation" If I do a require_once("somefile.php"); does somefile.php get loaded and parsed once for each web request? (Guess I'm wondering what PHP's...
2
1565
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 compile the 2nd class, it compiles quickly. Does the compiler do anything like track changes in files or use previous compile output while compiling a file a 2nd or third time? If not, why is there a difference in compile times? It's long enough I...
2
1748
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 struct myStruct{ struct { UINT_PTR anything; UCHAR anything2; } myInnerStruct;
17
19331
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 build but did not see anything like dll. When I looked at the command line tools and sample, I only saw c code not vb. for dll the environment I have is
6
4904
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 the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still submits the form. Also I can't get it to transfer the file in the upload section. The file name...
8
2324
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 types. The problem: I have a number of mixed-mode functions which I want reuse. These functions revolve around converting a CLR String to a C++ std::string or
13
2002
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 runs. I've even deleted the control and started over. This is the code for the recordsource of the form: "SELECT * FROM qryGuestStorePurchases_pw WHERE
3
2312
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 to keep my extensions .c, but tell VSC++ (through an project option) to compile as C++98 code (as if it had .cpp extensions).
4
2320
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 not match the application name. This is a bit disconcerting but seems to not affect anything. Any reason why A2003 doesn't know the name of the app it's compiling. I never worried about something like this with A97 since it simply says "Compile...
0
9688
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10491
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10268
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10247
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4146
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.