I have 3 combos. The first one is to pick the type of voting panel. Some of the options are a panel type (column(2) - hidden) of a person, the others are a group. If the type of voting panel chosen is a type of person, a person combo is shown. If the type of voting panel chosen is a group, a group combo is shown.
Now, this is all fine and well, I can make a function in the form, to be used for navigation and initial setting of the combos, but my problem comes after a choice is made.
Say a person type is already chosen, and a person is chosen from the person combo. If a user goes to change the type of voting panel, I have to catch what type they are trying to change it to. If they are changing it to a type that is a group, I need to warn them that they can only have one type, and that we will wipe out the person already chosen. Does that make sense?
This is the function I call throughout the form's navigation (below). I just need to only call this, if they are ok with changing the value, i.e. if they do want to change the combo, I have to wipe out the value they had put, if the type they are changing to is the opposite of what it was (person or group).
My thought is that before update of the vPanelType combo, I need to get what the value was/is, and what they are attempting to change that combo to. By accessing the type, I can determine if they are changing from a person type to a group type, and vice versa. If they are switching that type, then I simply ask them if they are ok with removing the person/group already named, so they can choose a new one of the opposite type.
My challenge, is how to access the value that the combo is before they try to change it, and what they are trying to change it to.
Any help would be greatly appreciated.
misscrf
It is never too late to become what you could have been ~ George Eliot
Now, this is all fine and well, I can make a function in the form, to be used for navigation and initial setting of the combos, but my problem comes after a choice is made.
Say a person type is already chosen, and a person is chosen from the person combo. If a user goes to change the type of voting panel, I have to catch what type they are trying to change it to. If they are changing it to a type that is a group, I need to warn them that they can only have one type, and that we will wipe out the person already chosen. Does that make sense?
This is the function I call throughout the form's navigation (below). I just need to only call this, if they are ok with changing the value, i.e. if they do want to change the combo, I have to wipe out the value they had put, if the type they are changing to is the opposite of what it was (person or group).
Code:
Function checkvPanelType()
Dim vPanelType As Integer
vPanelType = Nz(Me.FKvPanelType.Column(2), 0)
If dvPanelType = 0 Then
Me.FKGroup.Visible = False
Me.FKPerson.Visible = False
Me.FKGroup.Value = ""
Me.FKPerson.Value = ""
ElseIf dvPanelType = 1 Then
Me.FKGroup.Visible = False
Me.FKPerson.Visible = True
Me.FKGroup.Value = ""
ElseIf dvPanelType = 2 Then
Me.FKGroup.Visible = True
Me.FKPerson.Visible = False
Me.FKPerson.Value = ""
End If
End Function
My thought is that before update of the vPanelType combo, I need to get what the value was/is, and what they are attempting to change that combo to. By accessing the type, I can determine if they are changing from a person type to a group type, and vice versa. If they are switching that type, then I simply ask them if they are ok with removing the person/group already named, so they can choose a new one of the opposite type.
My challenge, is how to access the value that the combo is before they try to change it, and what they are trying to change it to.
Any help would be greatly appreciated.
misscrf
It is never too late to become what you could have been ~ George Eliot