My Assistant
![]() ![]() |
|
|
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 |
|
|
|
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?
|
|
|
|
Feb 3 2006, 03:41 PM
Post
#3
|
|
|
UtterAccess VIP Posts: 31,413 From: NC, USA |
Where are your end with?
HTH Good luck |
|
|
|
Feb 3 2006, 04:16 PM
Post
#4
|
|
|
UtterAccess Addict Posts: 149 |
Yes, thanks.
|
|
|
|
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 Top · Lo-Fi Version | Time is now: 23rd May 2013 - 10:11 AM |