PC Review


Reply
Thread Tools Rate Thread

compile error: label not defined

 
 
=?Utf-8?B?Sm9obkx1dGU=?=
Guest
Posts: n/a
 
      2nd May 2006
I have a compile error I can't understand. I placed >< around the line that
the debugger highlights. Any help is greatly appreciated - THANKS!

Private Sub Country_Region_DblClick(Cancel As Integer)
On Error GoTo Err_Country_Region_DblClick
Dim lngCity As Long

If IsNull(Me![Country_Region]) Then
Me![Country_Region].Text = ""
Else
lngCountry_Region = Me![Country_Region]
Me![Country_Region] = Null
End If
DoCmd.OpenForm "frmCountriesLanguages", , , , , acDialog, "GotoNew"
Me![Country_Region].Requery
If lngCountry_Region <> 0 Then Me![Country_Region] = lngCountry_Region

Exit_City_DblClick:
Exit Sub

Err_City_DblClick:
MsgBox Err.Description
>Resume Exit_Country_Region_DblClick<

End Sub
--
www.Marzetti.com
 
Reply With Quote
 
 
 
 
=?Utf-8?B?JzY5IENhbWFybw==?=
Guest
Posts: n/a
 
      2nd May 2006
Hi, John.

>I have a compile error


Replace this line:

Resume Exit_Country_Region_DblClick

.. . . with this one:

Resume Exit_City_DblClick

So that I never have to make changes to labels in my error handling code, I
use a generic error handler for procedures. For example:

Private Sub OpenOEBtn_Click()

On Error GoTo ErrHandler

' Code goes here.

CleanUp:

' Cleanup code goes here.

Exit Sub

ErrHandler:

MsgBox "Error in OpenOEBtn_Click( ) in " & Me.Name & " form." & _
vbCrLf & vbCrLf & _
"Error #" & Err.Number & vbCrLf & Err.Description, _
vbExclamation + vbOKOnly, "Error!"
Err.Clear
GoTo CleanUp

End Sub

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact info.


"JohnLute" wrote:

> I have a compile error I can't understand. I placed >< around the line that
> the debugger highlights. Any help is greatly appreciated - THANKS!
>
> Private Sub Country_Region_DblClick(Cancel As Integer)
> On Error GoTo Err_Country_Region_DblClick
> Dim lngCity As Long
>
> If IsNull(Me![Country_Region]) Then
> Me![Country_Region].Text = ""
> Else
> lngCountry_Region = Me![Country_Region]
> Me![Country_Region] = Null
> End If
> DoCmd.OpenForm "frmCountriesLanguages", , , , , acDialog, "GotoNew"
> Me![Country_Region].Requery
> If lngCountry_Region <> 0 Then Me![Country_Region] = lngCountry_Region
>
> Exit_City_DblClick:
> Exit Sub
>
> Err_City_DblClick:
> MsgBox Err.Description
> >Resume Exit_Country_Region_DblClick<

> End Sub
> --
> www.Marzetti.com

 
Reply With Quote
 
=?Utf-8?B?Sm9obkx1dGU=?=
Guest
Posts: n/a
 
      2nd May 2006
Thanks! Good grief - I can't believe I didn't see that!

--
www.Marzetti.com


"'69 Camaro" wrote:

> Hi, John.
>
> >I have a compile error

>
> Replace this line:
>
> Resume Exit_Country_Region_DblClick
>
> . . . with this one:
>
> Resume Exit_City_DblClick
>
> So that I never have to make changes to labels in my error handling code, I
> use a generic error handler for procedures. For example:
>
> Private Sub OpenOEBtn_Click()
>
> On Error GoTo ErrHandler
>
> ' Code goes here.
>
> CleanUp:
>
> ' Cleanup code goes here.
>
> Exit Sub
>
> ErrHandler:
>
> MsgBox "Error in OpenOEBtn_Click( ) in " & Me.Name & " form." & _
> vbCrLf & vbCrLf & _
> "Error #" & Err.Number & vbCrLf & Err.Description, _
> vbExclamation + vbOKOnly, "Error!"
> Err.Clear
> GoTo CleanUp
>
> End Sub
>
> HTH.
> Gunny
>
> See http://www.QBuilt.com for all your database needs.
> See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
> http://www.Access.QBuilt.com/html/ex...ributors2.html for contact info.
>
>
> "JohnLute" wrote:
>
> > I have a compile error I can't understand. I placed >< around the line that
> > the debugger highlights. Any help is greatly appreciated - THANKS!
> >
> > Private Sub Country_Region_DblClick(Cancel As Integer)
> > On Error GoTo Err_Country_Region_DblClick
> > Dim lngCity As Long
> >
> > If IsNull(Me![Country_Region]) Then
> > Me![Country_Region].Text = ""
> > Else
> > lngCountry_Region = Me![Country_Region]
> > Me![Country_Region] = Null
> > End If
> > DoCmd.OpenForm "frmCountriesLanguages", , , , , acDialog, "GotoNew"
> > Me![Country_Region].Requery
> > If lngCountry_Region <> 0 Then Me![Country_Region] = lngCountry_Region
> >
> > Exit_City_DblClick:
> > Exit Sub
> >
> > Err_City_DblClick:
> > MsgBox Err.Description
> > >Resume Exit_Country_Region_DblClick<

> > End Sub
> > --
> > www.Marzetti.com

 
Reply With Quote
 
'69 Camaro
Guest
Posts: n/a
 
      2nd May 2006
You're welcome! Always remember that two sets of eyes are better than one!

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact
info.


"JohnLute" <(E-Mail Removed)> wrote in message
news:E7A58B02-9197-46E3-B2EE-(E-Mail Removed)...
> Thanks! Good grief - I can't believe I didn't see that!
>
> --
> www.Marzetti.com
>
>
> "'69 Camaro" wrote:
>
>> Hi, John.
>>
>> >I have a compile error

>>
>> Replace this line:
>>
>> Resume Exit_Country_Region_DblClick
>>
>> . . . with this one:
>>
>> Resume Exit_City_DblClick
>>
>> So that I never have to make changes to labels in my error handling code,
>> I
>> use a generic error handler for procedures. For example:
>>
>> Private Sub OpenOEBtn_Click()
>>
>> On Error GoTo ErrHandler
>>
>> ' Code goes here.
>>
>> CleanUp:
>>
>> ' Cleanup code goes here.
>>
>> Exit Sub
>>
>> ErrHandler:
>>
>> MsgBox "Error in OpenOEBtn_Click( ) in " & Me.Name & " form." & _
>> vbCrLf & vbCrLf & _
>> "Error #" & Err.Number & vbCrLf & Err.Description, _
>> vbExclamation + vbOKOnly, "Error!"
>> Err.Clear
>> GoTo CleanUp
>>
>> End Sub
>>
>> HTH.
>> Gunny
>>
>> See http://www.QBuilt.com for all your database needs.
>> See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
>> http://www.Access.QBuilt.com/html/ex...ributors2.html for contact
>> info.
>>
>>
>> "JohnLute" wrote:
>>
>> > I have a compile error I can't understand. I placed >< around the line
>> > that
>> > the debugger highlights. Any help is greatly appreciated - THANKS!
>> >
>> > Private Sub Country_Region_DblClick(Cancel As Integer)
>> > On Error GoTo Err_Country_Region_DblClick
>> > Dim lngCity As Long
>> >
>> > If IsNull(Me![Country_Region]) Then
>> > Me![Country_Region].Text = ""
>> > Else
>> > lngCountry_Region = Me![Country_Region]
>> > Me![Country_Region] = Null
>> > End If
>> > DoCmd.OpenForm "frmCountriesLanguages", , , , , acDialog, "GotoNew"
>> > Me![Country_Region].Requery
>> > If lngCountry_Region <> 0 Then Me![Country_Region] =
>> > lngCountry_Region
>> >
>> > Exit_City_DblClick:
>> > Exit Sub
>> >
>> > Err_City_DblClick:
>> > MsgBox Err.Description
>> > >Resume Exit_Country_Region_DblClick<
>> > End Sub
>> > --
>> > www.Marzetti.com



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Compile error: label not defined SASKOPEJCINOSKI Microsoft Access 0 16th Mar 2008 03:32 PM
Compile Error: Label not defined =?Utf-8?B?SGVhdGhlciBWZXJub24=?= Microsoft Access 3 21st Oct 2005 09:17 PM
Compile Error: label not defined Walter Microsoft Access Form Coding 2 4th Jan 2005 05:40 PM
Compile Error: Label not Defined Jeannette Microsoft Access Macros 1 22nd May 2004 04:52 PM
Compile Error: Label not Defined Jeannette Microsoft Access Macros 0 20th May 2004 06:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:11 PM.