Hi,
I have a long survey that needs to run over 2 pages due to the number of questions. I have a 'page 2' button on the bottom of the first page that opens page 2 of the survey. On page 1 the user selected the Client (Episode ID) and a Survey ID (ILSID) is automatically created. When the user selects the 'page 2 button' the blank form that opens autofills the client ID, Date that was filled out on the first page (which is happening due to Default ) but I want it to also put in the same Survey ID from page 1. When Page 2 opens I see a 'New" appear in the ILSID field? I currently have the following code, yet it is instead creating the next record which is wrong. Do you know how to amend this code so it allows the ILSID to only fill out from what is currently on Form 1?
Code:
Option Compare Database
Option Explicit
Private Sub cmdOpenPage2_Click()
On Error GoTo Err_cmdOpenPage2_Click Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmILSAssessment2"
stLinkCriteria = "[ILSID]=" & Me![ILSID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdOpenPage2_Click:
Exit Sub
Err_cmdOpenPage2_Click:
MsgBox Err.Description
Resume Exit_cmdOpenPage2_Click
End Sub
Thanks in advance for your time and effort.