Hi All
Looking for some quick help
I have a form made from the data in a table and what I would like to do is
if the data in one txt box = 1 than only the data1 text box would be available for edit,
if the data in one txt box = 2 than only the data2 text box would be available for edit,
and so on
below is the code I have entered on the on open event of the form
Private Sub Form_Open(Cancel As Integer)
If DataTypes = 1 Then
Data1.Enabled = True
Else
Data1.Enabled = False
End If
If DataTypes = 2 Then
Data2.Enabled = True
Else
Data2.Enabled = False
End If
If DataTypes = 3 Then
Data3.Enabled = True
Else
Data3.Enabled = False
End If
End Sub
Any help would be fantastic
Thanks
danson
Looking for some quick help
I have a form made from the data in a table and what I would like to do is
if the data in one txt box = 1 than only the data1 text box would be available for edit,
if the data in one txt box = 2 than only the data2 text box would be available for edit,
and so on
below is the code I have entered on the on open event of the form
Private Sub Form_Open(Cancel As Integer)
If DataTypes = 1 Then
Data1.Enabled = True
Else
Data1.Enabled = False
End If
If DataTypes = 2 Then
Data2.Enabled = True
Else
Data2.Enabled = False
End If
If DataTypes = 3 Then
Data3.Enabled = True
Else
Data3.Enabled = False
End If
End Sub
Any help would be fantastic
Thanks
danson