UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> WITH command not implemented well?    
 
   
Banaticus
post Feb 3 2006, 03:26 PM
Post #1

UtterAccess Addict
Posts: 149



Check out those commented out lines -- they work great. But, I thought I'd put in a WITH statement for less typing in the future if I have to change this again. I must have typed it wrong, what do you all think?
CODE
Private Sub Names_Locker()
    If [Name Toggle].Value = True Then
'        Me.Notes_Subform.Form.Form.AllowEdits = True
'        Me.Notes_Subform.Form.AllowDeletions = True
'        Me.Notes_Subform.Form.AllowAdditions = True
'        Me.Notes_Subform.Form.NavigationButtons = True
        With Me.Notes_Subform.Form
            .AllowEdits = True
            .AllowDeletions = True
            .AllowAdditions = True
            .NavigationButtons = True
        [Name Toggle].Picture = "F:\Access\redbutton.bmp"
    ElseIf [Name Toggle].Value = False Then
'        Me.Notes_Subform.Form.AllowEdits = False
'        Me.Notes_Subform.Form.AllowDeletions = False
'        Me.Notes_Subform.Form.AllowAdditions = False
'        Me.Notes_Subform.Form.NavigationButtons = False
        With Me.Notes_Subform.Form
            .AllowEdits = False
            .AllowDeletions = False
            .AllowAdditions = False
            .NavigationButtons = False
        [Name Toggle].Picture = "F:\Access\bluebutton.bmp"
    End If
End Sub
Go to the top of the page
 
+
fkegley
post Feb 3 2006, 03:40 PM
Post #2

UtterAccess VIP
Posts: 23,583
From: Mississippi



You're missing the matching End With statements aren't you?
Go to the top of the page
 
+
freakazeud
post Feb 3 2006, 03:41 PM
Post #3

UtterAccess VIP
Posts: 31,413
From: NC, USA



Where are your end with?
HTH
Good luck
Go to the top of the page
 
+
Banaticus
post Feb 3 2006, 04:16 PM
Post #4

UtterAccess Addict
Posts: 149



Yes, thanks.
Go to the top of the page
 
+
freakazeud
post Feb 3 2006, 04:17 PM
Post #5

UtterAccess VIP
Posts: 31,413
From: NC, USA



You're welcome.
Glad we could assist.
Good luck on future projects!
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 23rd May 2013 - 10:11 AM