Snowflake68
Registered User.
- Local time
- Today, 02:54
- Joined
- May 28, 2014
- Messages
- 464
My database is for creating sales quotes which can be retrieved to continue on where it was previously saved. So when I open the form to edit the quote I only want the controls enabled if they previous entered something in them and the others disabled until they then carry on selecting values which in turn will enable the other controls.
I have the following code that I am trying to use to check to see if all the combo boxes and text boxes on my form have a value and if they do enable them.
But i get a the runtime error 438 object required pointing at this line of code
If possible, I also need to find away of enabling the next empty control after the very last enabled one so that they can continue on where they left off.
Can someone help please as I am no expert in VBA
Thanks
I have the following code that I am trying to use to check to see if all the combo boxes and text boxes on my form have a value and if they do enable them.
Code:
Dim ctrl As Control
For Each ctrl In Me.Controls
If Not IsNull(ctl.Value) Then
ctrl.Enabled = True
End If
Next
But i get a the runtime error 438 object required pointing at this line of code
Code:
If Not IsNull(ctl.Value) Then
If possible, I also need to find away of enabling the next empty control after the very last enabled one so that they can continue on where they left off.
Can someone help please as I am no expert in VBA
Thanks