B
bizchris2001
Guest
Can I update a dropdown using an input field?
Hi all,
I'm trying to make it so I can update a dropdown list via an input field. For example, the dropdown pulls from the Type field, and currently has: Rose, Tulip, Lily. I want the user to be able to choose Tulip from the dropdown, type "Chrysanthemum" in the input field, and when they click Submit, voila! The dropdown is now Rose, Chrysanthemum, Lily.
So far, I've got the dropdown (Combo0) working as such:
SELECT [tbl_Flowers].[PlantID], [tbl_Flowers].[CommonName] FROM tbl_Flowers;
No big deal, right? Now, the input field (simply named Text2) has no event behind it, and the Submit button (cmd_Update) has the following:
Private Sub cmd_Update_Click()
On Error GoTo Err_cmd_Update_Click
DoCmd.GoToRecord , , acNewRec
Exit_cmd_Update_Click:
Exit Sub
Err_cmd_Update_Click:
MsgBox Err.Description
Resume Exit_cmd_Update_Click
End Sub
Thoughts on how I could make the input field on the form update the dropdown values? Thanks! Chris
Hi all,
I'm trying to make it so I can update a dropdown list via an input field. For example, the dropdown pulls from the Type field, and currently has: Rose, Tulip, Lily. I want the user to be able to choose Tulip from the dropdown, type "Chrysanthemum" in the input field, and when they click Submit, voila! The dropdown is now Rose, Chrysanthemum, Lily.
So far, I've got the dropdown (Combo0) working as such:
SELECT [tbl_Flowers].[PlantID], [tbl_Flowers].[CommonName] FROM tbl_Flowers;
No big deal, right? Now, the input field (simply named Text2) has no event behind it, and the Submit button (cmd_Update) has the following:
Private Sub cmd_Update_Click()
On Error GoTo Err_cmd_Update_Click
DoCmd.GoToRecord , , acNewRec
Exit_cmd_Update_Click:
Exit Sub
Err_cmd_Update_Click:
MsgBox Err.Description
Resume Exit_cmd_Update_Click
End Sub
Thoughts on how I could make the input field on the form update the dropdown values? Thanks! Chris
Last edited: