armychick86
Registered User.
- Local time
- Today, 13:41
- Joined
- Feb 11, 2007
- Messages
- 25
I use an option group to enter information based on the whether the user chooses DHCP or Static IP Addresses. When choosing DHCP, Subnet Mask and Default gateway textboxes are disabled while IP address is enabled; when choosing Static all textboxes are enabled. That works great... to an extent.
Now for the problem...
The option chosen in one record changes all the records, for example:
DHCP is selected in Record 1, both SM and DG are disabled.
I move to record 2, Static is selected, both SM and DG are still disabled.
The textboxes stay disabled, they are not unique to the record but to the form. (I hope i explained that well enough)
Is there anyway I can fix this?
This is my code as is:
Private Sub fraIpAddress_AfterUpdate(Cancel As Integer)
If Me.fraIpAddress.Value = 1 Then
Me.txtIpAddress.Enabled = True
Me.txtSubnet.Enabled = False
Me.txtDefault.Enabled = False
Else
Me.txtIpAddress.Enabled = True
Me.txtSubnet.Enabled = True
Me.txtDefault.Enabled = True
End If
End Sub
Now for the problem...
The option chosen in one record changes all the records, for example:
DHCP is selected in Record 1, both SM and DG are disabled.
I move to record 2, Static is selected, both SM and DG are still disabled.
The textboxes stay disabled, they are not unique to the record but to the form. (I hope i explained that well enough)
Is there anyway I can fix this?
This is my code as is:
Private Sub fraIpAddress_AfterUpdate(Cancel As Integer)
If Me.fraIpAddress.Value = 1 Then
Me.txtIpAddress.Enabled = True
Me.txtSubnet.Enabled = False
Me.txtDefault.Enabled = False
Else
Me.txtIpAddress.Enabled = True
Me.txtSubnet.Enabled = True
Me.txtDefault.Enabled = True
End If
End Sub