peterengland
New Member
- Joined
- Apr 6, 2005
- Messages
- 7
I wanted a way of blanking out different fields on my customer form depending on weather it is a Business, Private or Caravan customer. The solution I got was to create 3 command buttons and using On Click and then entering the following in the code builder:
Private Sub Command14_Click()
Me.Business1.Enabled = False
Me.Business2.Enabled = False
End Sub
Private Sub Command15_Click()
Me.Caravan1.Enabled = False
Me.Caravan2.Enabled = False
End Sub
Private Sub Command23_Click()
Me.Private1.Enabled = False
Me.Private2.Enabled = False
End Sub
This allowed me to click the command button and for example the business1 and business2 fields greyed out. Also on the form I have a combo box with the following:
Business
Private
Caravan
Instead of click on the command button to activate the VB Code is it possible to click on for example business in the combo box and it load the business VB code.
Sorry for this being so long hope it makes sense and I would greatly appreciate any help/input
Kind Regards
Peter
Private Sub Command14_Click()
Me.Business1.Enabled = False
Me.Business2.Enabled = False
End Sub
Private Sub Command15_Click()
Me.Caravan1.Enabled = False
Me.Caravan2.Enabled = False
End Sub
Private Sub Command23_Click()
Me.Private1.Enabled = False
Me.Private2.Enabled = False
End Sub
This allowed me to click the command button and for example the business1 and business2 fields greyed out. Also on the form I have a combo box with the following:
Business
Private
Caravan
Instead of click on the command button to activate the VB Code is it possible to click on for example business in the combo box and it load the business VB code.
Sorry for this being so long hope it makes sense and I would greatly appreciate any help/input
Kind Regards
Peter