I have this form where you can fill in the records manually. Now i created a new function where you can filter the products and once you find the right one you can fill it in the form. Now i want to "automatize" this procedure a little bit by making a function once you dubbleclick on the right record in the filterlist the program should copy it in a new record in my form.
First i created a button just to test is if can add 100 to a new record in the field PCODE. Once this works i can add the dubbleclick function and replace the 100 by a variable. But it doesn't works.
it should be something like that
Private Sub Knop182_Click()
Dim rst As DAO.Recordset
Set rst = Forms![Bestellijst sub formulier].RecordsetClone
rst.AddNew PCODE, 100