dkilby
asked on
ms access + remove values from combo box
I have a form, and on the form there is a text box and a combo box, the text box is readonly, and the combo box is populated from a table.
The user selects a value from the combo box, and it adds what they selected to the value of the textbox.
is there a way to remove the value from the the combo box once selected, or a way to check the text in the textbox to see if the value was already added?
The text box could have several words inside, each separated by a comma.
The user selects a value from the combo box, and it adds what they selected to the value of the textbox.
is there a way to remove the value from the the combo box once selected, or a way to check the text in the textbox to see if the value was already added?
The text box could have several words inside, each separated by a comma.
ASKER
i am using visual basic on the afterupdate event
Yes I know ... can you post that code ?
mx
mx
ASKER
ah sorry - here is the code.
Private Sub cboKeywords_AfterUpdate()
Dim str As String
str = str & Me.cboKeywords
Me.txtKeywords = Me.txtKeywords & str & ", "
End Sub
Private Sub cboKeywords_AfterUpdate()
Dim str As String
str = str & Me.cboKeywords
Me.txtKeywords = Me.txtKeywords & str & ", "
End Sub
ok ...then to clear the combo:
Private Sub cboKeywords_AfterUpdate()
Dim str As String
str = str & Me.cboKeywords
Me.txtKeywords = Me.txtKeywords & str & ", "
Me.cboKeyWords= Null ' *********** add this
End Sub
Private Sub cboKeywords_AfterUpdate()
Dim str As String
str = str & Me.cboKeywords
Me.txtKeywords = Me.txtKeywords & str & ", "
Me.cboKeyWords= Null ' *********** add this
End Sub
ASKER
can i also check the value of txtKeywords to make sure the value of cboKeywords has not already been added?
sure ... stand by
Here you go.
mx
mx
ASKER
i think the actual code is missing?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect thanks for the help
mx