Hi there folks, please go easy with a beginner.
In my database, you can open a Client record and create an Enquiry in a form called frmEnquiriesNew – what I want, is a Save button, which closes the current form and opens the same record in a different form, frmEnquiries (which has a bit more functionality). The point is that users can't access all the features of frmEnquiries until they have added the basic information and saved the record.
I have added the below code to a save button but when I use it, it just opens the frmEnquiries form with a completely different record. Is it obvious where I am going wrong here?
Thank you for your helpCode:Private Sub cmdSaveEnquiry_Click() Dim EnqIDPass As Integer EnqIDPass = Me.Enquiry_ID.Value DoCmd.Close acForm, "frmEnquiriesNew" DoCmd.OpenForm "frmEnquiries", , "[Enquiry ID]=" & EnqIDPass End Sub
Simon


Opening a new form, with the same record ID
Reply With Quote

