aftershokk
Registered User.
- Local time
- Today, 14:56
- Joined
- Sep 5, 2001
- Messages
- 259
Hi all, I have a report the runs based on a check box that limits the data to a filtered range. I use send commands to convert to a .pdf. See below.
1. Open report for print preview
Function redesign_send()
On Error GoTo redesign_send_Err
DoCmd.Echo True, ""
DoCmd.OpenReport "fee_schedule_rpt_new", acViewPreview, "", "", acNormal
DoCmd.RunMacro "send_commands", , ""
redesign_send_Exit:
Exit Function
redesign_send_Err:
MsgBox Error$
Resume redesign_send_Exit
End Function
----------------------------------
2. Use send commands to convert to .pdf
Function send_commands()
On Error GoTo send_commands_Err
SendKeys "alt p", False
SendKeys "{ENTER}", True
send_commands_Exit:
Exit Function
send_commands_Err:
MsgBox Error$
Resume send_commands_Exit
End Function
---------------------------------
What I want to do is have the report convert to .pdf based on the name of the category used to filter the list (check box). I have a separate query (see figure 1 below) to return the unique filtered category.
Example: Right now I click the check box for the category named Pediatrics and the report is created for Pediatric values. When I create the .pdf I want the report to be named Pediatrics.pdf AUTOMATICALLY? Right now I type the name into the pop-up box of the location to save the file.
make any sense?
figure 1
SELECT speciality_lookup_table_08.type, speciality_lookup_table_08.report_indicator
FROM speciality_lookup_table_08
WHERE (((speciality_lookup_table_08.report_indicator)=Yes));
thanks
screen shots attached that hopefully help
Attachments
Last edited: