Hi. I have a form in continuous forms view and a button that allows the user to select a record from the returned list. The idea is I want to open the new form but at a new record with some of the data from the selected case transferred to the new form. I have tried to do this but without success.
This code:
Private Sub btnSelectAudit_Click()
DoCmd.OpenQuery "qrySelectedAuditCase"
DoCmd.OpenForm "FrmAudit", , acNewRec
Forms!frmaudit.Underwriter = Query!qryselectedauditcase.LC_AuthByName
DoCmd.OpenForm "FrmAudit", , , "Underwriter = '" & Me.LC_AuthByName & "'"
End Sub
I tried to put a stage between to have only one record (hence the open query step). The last DoCmd I include because it was my first attempt. There are 4 values in the open form that I would like to pass into the new form as pre-populated values.
Any help appreciated!