Combining Several Reports into one batch and searching one ID

Inetta

Registered User.
Local time
Today, 17:44
Joined
May 26, 2012
Messages
21
Hello
I am not a programmer by any means. I am a social worker and I created my database for use in my business to use for my client records. I travel and need to have my case files mobile. I have been using the database I created for about 4 years - but I think there is a better way to handle parts of it.

I have created reports for each section of my case file (demographics, social service assessment, etc). I would like to use a control button to pull all of those reports together and then only show the page of the reports with the specific client ID number. From there I would like to print all of the reports for that one client. Presently I go to each report, search the client ID number and then print just that page. When I am compiling "printed records" for my clients - that process takes a very long time. I was wondering if this can be done - and how would be the easiest way to complete. I have searched for answers and found another thread that made reference to datapigtechnologies - but this looks like it is to find records - and not the report. I have the report formated to look like our other forms so I would like to continue to use the format I have set up for the form. Just need to know if there is a simplier way to pull all of the separate reports together and then search for just the client ID number and have all the reports for that one ID number print.

Any help or guidance would be appreciated.
Inetta
 
Look to use a MACRO which uses OpenReport and then select your first report below then set the argument to use the form ID against the Table ID once you have that done then all you need to do is repeat the actions in the same way for the other reports then you can print all your reports in one go. The macro can then become a button on the form and when you click based on the record you are one it will work for you.
 
That makes sense - but I am not sure how to write the agument. When I created the macro - the argument that shows is the name of the report,Report,,,Normal. Can you offer any further assistance on how to write the argument?

Thanks
 
OK here goes,

Once you select to create a New Macro and then select the Action to Open Report the bottom window is displayed. You would do the following:

Report Name: Select the first report to open
View: Select to Print Preview this to start with
Filter Name: Ignore this line
Where Condition: Forms![frmName]![ID FIELD] = [Table Name]![ID Field]
In the Where Condition:
This is where you click the button to the right (elipse button) this then displays the Expression builder and here you would search down the left side and double click forms, then All forms or Loaded if your form is already open then double click the ID Field then in the Expression add the equal sign and then double click the table on the left and select your table and then double click the ID Field. So the conditions would be something like this:

Forms![frmName]![ID FIELD] = [Table Name]![ID Field]

Close the Expression Builder and save the macro. Then you repeat this for the other reports.
 
This is working to get the specific page of the report for the right person. Once I have all of the macros created - then do I just use all of those macros on my control button?

I'm sorry I'm so slow at this. I do appreciate you patience and assistance.
Inetta
 
You only need one macro but you use Actions, not just one action, so once you created your first action then click the next action and so one so the one macro will do many actions.
 
OOOOHHHHHH - that makes much more sense. Thanks so much.
 
I'm back - this works with the control button - but it opens each report up separately - which is ok. Can I then print all of those that are open at one time or do I have to print each individually? Also - I have my forms set up that from my main form - I can open additional forms for the correct person. Can that be written into the macro so I don't have to enter the client ID - but have the macro run with the control button on the client case that is open?
 
The other forms I wrote it in on the event procedure. can I do the same thing here?
 
Yes to the forms, as to the printing, if you don't need to preview them then adjust the Print Preview to Print. I only suggest the Print Preview to start with to make sure you see the correct data to start with, but if it is working then use the Print rather than Print Preview.

Add the open forms Actions into the same macro.
 
I don't think I explained what I meant correctly. I already have contol buttons on my main form to open up my other forms. Below is what I have written on the event procedure. I just copied it from another thread and it works great. Whatever client's form that is open when I click the control button - that same client's next form opens. That way I always know I'm entering data on the same person - since only their forms open.

Private Sub Operations_Click()
On Error GoTo Err_Operations_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_Operations"

stLinkCriteria = "[clientid]=" & Me![Text361]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Operations_Click:
Exit Sub
Err_Operations_Click:
MsgBox Err.Description
Resume Exit_Operations_Click

End Sub


What I wanted to do was the same thing with the macro I just created. I would like for the macro to work on the client's form that I have open - so I don't have to type in their ID number. I hope I am making sense. Everything else works great with the macro.

Thanks so much for your help!!!!
 
The message box that comes up is enter parameter value. I enter the client ID and it works - but this box opens with every form and I have to keep entering it. I don't know if I have the relationships set up wrong in my querys or what. Like I said earlier - I have been using it like it is for the last 4 years and I really don't know what I'm doing. I just got it to work and now I thought I would try and tweek it to make it work a little better.

Again - thanks so much - I'll just keep pluging away.
Inetta
 
If you stick to the original idea of creating the MACRO and use the Actions to open all forms and set the conditions, then test it and if it works you can then convert the macro into VBA so you have the code.
 
another question with my macro. If there is no data in the form - the macro does not print the page. In the report - even if there is no data entered - I still get the page with the client name and ID - but when I try to run from the macro - it will only bring up the pages that have data entered. I would like the page with the client name and ID on it - even if there is nothing to begin with. Is this a possiblity with the macro?
 
I dont understand your question. If you have set the macro to use Conditions and the Conditions aren't met you can't get it to do something like show the Client Name if no name is selected which shows the ID Field !
 
I'm sorry I am not clear. I'm trying to explain what I mean. The client name and ID number is typed in the field and shows up on the report when I just open the report. The rest of the report is blank except for the name and number. The problem comes when I tun the macro - nothing shows up except for the blank form. It doesn't even put in the name and client ID even though it is in there on the report. For the pages that have additional data along with the client name and ID - everything works fine. I tested it and if I typed just N/A in the comment section - then it show up with the name and client ID. I guess that is what I don't understand - when the name and client ID are already there. If the only way around this is to type N/A in the comments - I can do that. Just thought there may be a reason why it is doing it like this.

I really appreciate you patience. If this is the only problem I have to make it work - I'm good with that!!!! Thanks so much!!!!!
 
Ok I will step back now. It might be that you have to reset the focus back to one of the fields.
 
Thanks so much for your help. I couldn't have gotten this far without your assistance.

Inetta
 

Users who are viewing this thread

Back
Top Bottom