M
miss031
I don't know why this won't work. I am getting a type mismatch error.
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim varItem As Variant
Set db = CurrentDb
Set rst = db.OpenRecordset("tbl_firearms_licence")
For Each varItem In Me.txt_gun_lic_no.Column(0)
With rst
.AddNew
rst![contact_ID] = [Forms]![add_new_all]![contact_ID]
rst![licence_type] = varItem
'fill in here all the necessary field values
.Update
.Close
End With
Next varItem
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim varItem As Variant
Set db = CurrentDb
Set rst = db.OpenRecordset("tbl_firearms_licence")
For Each varItem In Me.txt_gun_lic_no.Column(0)
With rst
.AddNew
rst![contact_ID] = [Forms]![add_new_all]![contact_ID]
rst![licence_type] = varItem
'fill in here all the necessary field values
.Update
.Close
End With
Next varItem