I have a form in Access 97 on which I have an unbound list box filled
with our employees names from tblEmployees. When you select an
employee's name and click a button, the following code is run and
another form opens with only that employee's data:
For Each varSelected In Me!EmpList.Item sSelected
strSQL = strSQL & Me!EmpList.Item Data(varSelecte d) & ","
Next varSelected
If strSQL <> "" Then
strSQL = "[Employees].[EmployeeNumber] IN (" & Left(strSQL,
Len(strSQL) - 1) & ")"
DoCmd.OpenForm "frmVacationWee ks", acViewNormal, , strSQL
I have a textbox on the frmVacationWeek s called txtEmail. I need to
be able to click a button on this form that will automatically email a
report called rptApprovedVac only to the employee whose email address
is in txtEmail. I will appreciate any help you can give me on this.
Thanks,
JD
with our employees names from tblEmployees. When you select an
employee's name and click a button, the following code is run and
another form opens with only that employee's data:
For Each varSelected In Me!EmpList.Item sSelected
strSQL = strSQL & Me!EmpList.Item Data(varSelecte d) & ","
Next varSelected
If strSQL <> "" Then
strSQL = "[Employees].[EmployeeNumber] IN (" & Left(strSQL,
Len(strSQL) - 1) & ")"
DoCmd.OpenForm "frmVacationWee ks", acViewNormal, , strSQL
I have a textbox on the frmVacationWeek s called txtEmail. I need to
be able to click a button on this form that will automatically email a
report called rptApprovedVac only to the employee whose email address
is in txtEmail. I will appreciate any help you can give me on this.
Thanks,
JD
Comment