If you are running this within Access, you are already using the DB. You can get a reference to the currently opened DB by using Currentdb:
Set dbsInventory = CurrentDB
But for this, you can also try using DoCmd.RunSQL:
DoCmd.RunSQL "Insert into employee values (99, 'my name');"
Me.myCombo.Requery
Hope this helps.
>Yes, I'm trying to insert it into the base table, I just don't know how to code it right.
>Private Sub GWID_NotInList(NewData As String, Response As Integer)
> MsgBox ("TEST " & NewData)
>
> Dim dbsInventory As Database
> Dim rsGWID As Recordset
>
> Set dbsiNVENTORY = OpenDatabase("Inventory.mdb")
> Set rsGWID = _
>
> dbsiNVENTORY.OpenRecordset("GWID")
>
> Insert into rstGWID (gwid) values (NewData);
>End Sub
>
>I just don't know how to get at the table. I've tried a number of different ways. The above gives me 'Database is not a valid type'.
>
>judy