I need to make a combo box lookup values in a table, and also have entering data into the box write that dat to the table, while still saving the values to the table in use on the form. Is this possible?
How?
Thanks
The combobox wizard should be able to do all you requested just select the correct options when you run the wizard. When in design mode drop the combo box from the Tool box onto your form and the wizard will walk you through.
To enter new data into a combo box based on an external table, use this statement on the OnClick event of a control button. You have to update the external table to save the data.
Dim varName As Variant
varName = InputBox("Enter New Name"
Dim db As Database
Dim rst As Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("<name of external table>", dbOpenDynaset)
With rst
.AddNew
!<FieldName in table> = varName
.Update
Me.<ComboBoxName>.Requery
End With
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.