motoxracer400f
Registered User.
- Local time
- Today, 09:50
- Joined
- Feb 14, 2008
- Messages
- 11

I've used Visual Basics in the past and havn't had to many problems, but I am using Acess 2007 and am bit new to it and I just can't get this darn thing to work. Can someone please help me?
Here's the problem:
I have a form with a combo box and many text fields on it. There are a few tables that store all the information that I am accessing as well. I have a combo list box on this form called "Part" that pulls values from one of those table. I am trying to get all the text boxes to enable/unable based on what I select from the combo box. I thought I had it coded right, but when I run the form nothing even happens (everything is still enabled). What is going on with this????? What am I doing wrong?
Here is the code I am using:
Code:
Sub DisableAll()
'Disable all controls
Me.Customer.Enabled = False
Me.CustomerDWGNumber.Enabled = False
Me.Description.Enabled = False
Me.Material.Enabled = False
Me.UNSNumber.Enabled = False
Me.GaugeThickness.Enabled = False
Me.Notes.Enabled = False
Me.UnitOfMeasurement.Enabled = False
Me.Length.Enabled = False
Me.Width.Enabled = False
Me.Height.Enabled = False
Me.Diameter.Enabled = False
Me.OD.Enabled = False
Me.PipeOD.Enabled = False
Me.CenterCenter.Enabled = False
Me.Taper.Enabled = False
Me.HoleCenterCenter.Enabled = False
Me.CenterCanThickness.Enabled = False
Me.CenterCanHeight.Enabled = False
Me.ICDesign.Enabled = False
Me.ICStyle.Enabled = False
Me.LiftingType.Enabled = False
End Sub
Private Sub Form_Load()
Call DisableAll
End Sub
Private Sub Part_BeforeUpdate(Cancel As Integer)
Call DisableAll
Select Case Me.Part
'Baskets
Case "BA01"
Me.Material.Enabled = True
Me.OD.Enabled = True
Me.Length.Enabled = True
Me.Width.Enabled = True
Me.Height.Enabled = True
Me.Notes.Enabled = True
Case "BA02"
Me.Material.Enabled = True
Me.OD.Enabled = True
Me.Length.Enabled = True
Me.Width.Enabled = True
Me.Height.Enabled = True
Me.Notes.Enabled = True
Case "BA03"
Me.Material.Enabled = True
Me.OD.Enabled = True
Me.Length.Enabled = True
Me.Width.Enabled = True
Me.Height.Enabled = True
Me.Notes.Enabled = True
Case Else
End Select
End Sub