F
fireytech
I have created a launch form which asks the user to enter the
datepayperiod (pay period end date) and their vendorID (employee
number). I have created a button for them to click to open our time
sheet form (frm_timesheet) and automatically carry the pay period date
and the vendorid to the new form. I did this to prevent the user from
editing the pay period date or their vendorid fields on the data entry
form.
I know how to make the form take one field and carry it to the new
form but I don't know how to make it carry both the datepayperiod and
vendorid fields to the data entry form.
Here is the code I have so far:
Private Sub CreateNewTimesheet_Click()
On Error GoTo Err_CreateNewTimesheet_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FRM_Timesheet"
DoCmd.OpenForm stDocName, , , acFormAdd
Forms(stDocName)![VendorID] = Me.[VendorID]
Exit_CreateNewTimesheet_Click:
Exit Sub
Err_CreateNewTimesheet_Click:
MsgBox Err.Description
Resume Exit_CreateNewTimesheet_Click
End Sub
Thanks in advance!
datepayperiod (pay period end date) and their vendorID (employee
number). I have created a button for them to click to open our time
sheet form (frm_timesheet) and automatically carry the pay period date
and the vendorid to the new form. I did this to prevent the user from
editing the pay period date or their vendorid fields on the data entry
form.
I know how to make the form take one field and carry it to the new
form but I don't know how to make it carry both the datepayperiod and
vendorid fields to the data entry form.
Here is the code I have so far:
Private Sub CreateNewTimesheet_Click()
On Error GoTo Err_CreateNewTimesheet_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FRM_Timesheet"
DoCmd.OpenForm stDocName, , , acFormAdd
Forms(stDocName)![VendorID] = Me.[VendorID]
Exit_CreateNewTimesheet_Click:
Exit Sub
Err_CreateNewTimesheet_Click:
MsgBox Err.Description
Resume Exit_CreateNewTimesheet_Click
End Sub
Thanks in advance!