[AccessD] Compile Error - Label Not Defined

Heenan, Lambert Lambert.Heenan at aig.com
Thu Feb 27 13:57:45 CST 2014


The Error handler in btnBickleyFontGwen_Click says

Resume Exit_btnBickleyFontGwen_Click

But you do not have a label called " Exit_btnBickleyFontGwen_Click", but rather one called "Exit_btnBickleyGwenFont_Click"

Lambert

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kathryn at Gwen's
Sent: Thursday, February 27, 2014 2:53 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Compile Error - Label Not Defined

Totally different mdb this time. I'm totally out of my bailiwick with making print buttons. In the past, I've had no problem copying one, then modifying it, compiling, and everything works. This time, I'm getting an error. First is the one that works fine (* note at end).

- - - - - - - -
Private Sub btnBickleyFont_Click()
On Error GoTo Err_btnBickleyFont_Click

    Dim DocName As String

    DocName = "Envelope - Binkley Font"
    DoCmd.OpenReport DocName, A_PREVIEW

Exit_btnBickleyFont_Click:
    Exit Sub

Err_btnBickleyFont_Click:
    MsgBox Error$
    Resume Exit_btnBickleyFont_Click

End Sub
- - - - - - - -
Now the new one:
- - - - - - - -
Private Sub btnBickleyFontGwen_Click()
On Error GoTo Err_btnBickleyFontGwen_Click

    Dim DocName As String

    DocName = "Envelope - Binkley Font Gwen"
    DoCmd.OpenReport DocName, A_PREVIEW

Exit_btnBickleyGwenFont_Click:
    Exit Sub

Err_btnBickleyFontGwen_Click:
    MsgBox Error$
    Resume Exit_btnBickleyFontGwen_Click End Sub
- - - - - - - -
That's the one that I get "Compile Error - Label Not Defined" - what does that mean? How do I fix it?


--
Kathryn Bassett
kathrynatgwens at socal.rr.com (work)
Kathryn at bassett.net (home)




(*) though recently, without any modification, it gives a blank envelope in between printed envelopes. Livable, but baffling.


---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list