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