S
Shane
I have form EnterID where the user enters a WorkShopID the following code is
for the open form button which they press after entering the code
Private Sub Open_Form_Click()
On Error GoTo Err_Command3_Click
Dim stDocName As String
Dim stLinkCriteria As String
WorkShopID = Me![WorkShopID]
stLinkCriteria = WorkShopID
stDocName = "Entering Attendance List"
DoCmd.OpenForm stDocName, , , WorkShopID
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Sub
This opens the enter attendance list class where they enter the people who
attended that workshop. I want to be able to pass the workshopId entered in
the previous form to this form so they don’t have to re-enter it again. Just
wondering how you would do this.
Here's the code fo enter attendance list.
Private Sub Add_Employee_Click()
On Error GoTo Err_Add_Employee_Click
DoCmd.GoToRecord , , acNewRec
Exit_Add_Employee_Click:
Exit Sub
Err_Add_Employee_Click:
MsgBox Err.Description
Resume Exit_Add_Employee_Click
End Sub
Private Sub Cancel_Click()
Dim stDocName As String
stDocName = "Trainer Form"
DoCmd.OpenForm stDocName, , , , , acDialog
Me.Visible = False
End Sub
Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec
End Sub
for the open form button which they press after entering the code
Private Sub Open_Form_Click()
On Error GoTo Err_Command3_Click
Dim stDocName As String
Dim stLinkCriteria As String
WorkShopID = Me![WorkShopID]
stLinkCriteria = WorkShopID
stDocName = "Entering Attendance List"
DoCmd.OpenForm stDocName, , , WorkShopID
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Sub
This opens the enter attendance list class where they enter the people who
attended that workshop. I want to be able to pass the workshopId entered in
the previous form to this form so they don’t have to re-enter it again. Just
wondering how you would do this.
Here's the code fo enter attendance list.
Private Sub Add_Employee_Click()
On Error GoTo Err_Add_Employee_Click
DoCmd.GoToRecord , , acNewRec
Exit_Add_Employee_Click:
Exit Sub
Err_Add_Employee_Click:
MsgBox Err.Description
Resume Exit_Add_Employee_Click
End Sub
Private Sub Cancel_Click()
Dim stDocName As String
stDocName = "Trainer Form"
DoCmd.OpenForm stDocName, , , , , acDialog
Me.Visible = False
End Sub
Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec
End Sub