P
Pawel
Hello,
I have an combo box with a query as a data source. Query
takes data from separate table. I am trying to dinamically
add data to combo box.
Here is the code:
Private Sub Model_NotInList(NewData As String, Response As
Integer)
Dim ctl As Control
Dim dbs As Database
Dim rst As Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("Model", dbOpenDynaset)
rst.AddNew
rst!Model = NewData
rst.Update
rst.Close
dbs.Close
End Sub
So the newly entered item was added to the table. How can
I refresh combo box so on its list there will be new item?
With above code everything what I am able to achieve is
error message that I should pick up item from the list.
Thank you,
Pawel
I have an combo box with a query as a data source. Query
takes data from separate table. I am trying to dinamically
add data to combo box.
Here is the code:
Private Sub Model_NotInList(NewData As String, Response As
Integer)
Dim ctl As Control
Dim dbs As Database
Dim rst As Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("Model", dbOpenDynaset)
rst.AddNew
rst!Model = NewData
rst.Update
rst.Close
dbs.Close
End Sub
So the newly entered item was added to the table. How can
I refresh combo box so on its list there will be new item?
With above code everything what I am able to achieve is
error message that I should pick up item from the list.
Thank you,
Pawel