Graham T
Registered User.
- Local time
- Today, 16:34
- Joined
- Mar 14, 2001
- Messages
- 300
I am trying to set values within a combo box to N/A dependant on a value choosen from an option group on my form. If a user selects a value then various controls should be set to N/A as they require no further details to be entered.
The code I have tried using is as follows:
******************************************
Private Sub Alt_Acc_1_AfterUpdate()
'Code attached to option group where 'Yes' = 1
'and 'No' = 2
If (Me!Alt_Acc_1 = 1) Then 'equals Yes
Me!Alt_HomeID = "" 'leave both combo boxes blank
Me!Pref_Tenure_id = ""
Else
Me!Alt_HomeID = 5 'set both combo boxes to N/A
Me!Pref_Tenure_id = 5
End If
End Sub
******************************************
Is this possible as at present the only value being set is Alt_HomeID to N/A. These values are both stored in seperate tables with the ID of 5.
I hope this makes sense.
Graham
[This message has been edited by Graham T (edited 12-19-2001).]
The code I have tried using is as follows:
******************************************
Private Sub Alt_Acc_1_AfterUpdate()
'Code attached to option group where 'Yes' = 1
'and 'No' = 2
If (Me!Alt_Acc_1 = 1) Then 'equals Yes
Me!Alt_HomeID = "" 'leave both combo boxes blank
Me!Pref_Tenure_id = ""
Else
Me!Alt_HomeID = 5 'set both combo boxes to N/A
Me!Pref_Tenure_id = 5
End If
End Sub
******************************************
Is this possible as at present the only value being set is Alt_HomeID to N/A. These values are both stored in seperate tables with the ID of 5.
I hope this makes sense.
Graham
[This message has been edited by Graham T (edited 12-19-2001).]