I would like to pass the form name to a procedure within a module so that it can be used within a recordset update, I have tried various methods and got various error messages in return!, my current bit of code looks like this
(FN is the name of the form being passed in to the function)
Can this be done?
If IT ain’t working Binnit and Reboot
(FN is the name of the form being passed in to the function)
Code:
Public Sub Addrec(FN)
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tbltest", dbOpenDynaset)
With rst
.AddNew
![f2] = Forms![FN]![txtF2]
![f3] = Forms![FN]![txtF3]
![f4] = Forms![FN]![txtF4]
.Update
End With
End Sub
Can this be done?
If IT ain’t working Binnit and Reboot