list of dates, one name

Dick7Access

Dick S
Local time
Yesterday, 20:29
Joined
Jun 9, 2009
Messages
4,354
I need to make a report that shows one name, first and last and list all the attendance dates below. In the attached file you can see the report I have made list the names for each time for every attendance. Any help would be appreciated. I designed this DB in 2010 but saved it in 2003 as the people using it do not have 2010.
 

Attachments

Take a look at "grouping" in your report.

Just group your report by the Names.
 
Thanks Mr B that did it. I didn't even know where to look.
 
Mr B,
If you have the time would you mine opening up my attachment and click the print button. It brings up a Modal Dialog for two reports. Click the report all names. It brings up the report ok, but leaves the Modal Dialog on top. If I click ok it will close the Modal Dialog but reverts back to my Entering form. I would like it to stay on the report. I can’t even to begn to think how I would do that. Can you help? I know I can click the tab for the report but I need to make this idiot proof. Secondly if I was running the program I would know how to click file and print, but how to I put a print button on a report. Thanks in advance. Dick S.
 

Attachments

I have attached a modified version of your file.

I have created a new Print form with options that should help.

I have modified the query you were using for the "by one name" report.

I am now using VBA code and not macros.

I have added VBA code to the OnClose event of your reports.

From your main form, click the Print button and check out the changes.

As you have questions, just post back here.
 

Attachments

Mr. B,
Thanks for the revamp. The one name option works find sending it to the default printer, but the all names case does not. The sent to printer case opens a preview. Don’t tell me quite yet the solution, as I have been wanting to study VBA for a long time and this is as good a time as any. I have studied VB6 a little bit. I will go over the code a few more times and see if I can find the error.
 
Mr. B
I made the following code change, and it works fine. (See changes below) What I can’t figure out is why (DoCmd.OpenReport) prints. While (DoCmd.OpenReport needs a acViewPreview) to preview. Can you recommend a beginner’s free tutorial to bone up on VBA.
Private Sub cmdOk_Click()
'use a "Case" statement to determine the report to be used
Select Case Me.grpReportOpts
Case 1 'use the All Names report
'use a "Case" statement to determine the output for the report
Select Case Me.grpOutputOpts
Case 1 'preview report
DoCmd.OpenReport "Attandance All R", acViewPreview
Case 2 'send to printer
I took this out: ' DoCmd.OpenReport "Attandance All R", acViewPreview
And added this: DoCmd.OpenReport "Attandance All R"
End Select
Case 2 'use the by one name report
'use a "Case" statement to determine the output for the report
Select Case Me.grpOutputOpts
Case 1 'preview report
DoCmd.OpenReport "Attancance by name R", acViewPreview
Case 2 'send to printer
DoCmd.OpenReport "Attancance by name R"
End Select
 
Yep, that was it. I did all of those changes in a big hurry. Sorry that I missed that one.

Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom