forms/subforms

In the version I sent you earlier what you describe does not happen. You cannot do page breaks in a report, you can only play around with the headers and footers. Even so, if you are using the form to filter the report you should only get 1 record's data.
 
That is weird when I copied the updated version I am able to enter in the EmpID # and it pulls up the document blank. I will keep playing with it and see what happens. I am honestly lost as to why it is doing what it is doing. It only will show the first employee data and the rest of the entries are blank.
 
Where are you entering the EmpID? You should not have to enter it at all. It should be getting it automatically from frmEmployee. If you are viewing a record in frmEmployee all you have to do is click on the print button or the print preview button (you had both on the form) and it should print/print preview the current record.

That is weird when I copied the updated version I am able to enter in the EmpID # and it pulls up the document blank.

Are you saying that you did not use the actual database I posted? If not, you have to correct the code for both the print button and the print preview button you have on frmEmployee. I corrected both in the DB I posted.
 
Thanks for all your help I found out what I did wrong and now I have most of it working how I want it to. Thanks for all your help.:)
 
In the version I sent you earlier what you describe does not happen. You cannot do page breaks in a report, you can only play around with the headers and footers. Even so, if you are using the form to filter the report you should only get 1 record's data.
NOT correct. Of course you can use Page breaks in a report.
 
I stand corrected; thank you Rabbie for pointing that out. I learn something new everyday! To accomplish a page break, go into design view of the report and right click on the section for which you want to add the page break. In your case it will be the LName header. Go to Properties-->Format-->Force New Page. I chose Before Section from the drop down and it seems to work.
 
Ok Thanks to both of you. I did try it and it does work however it prints off a blank page with the header only on it how do I get rid of this so that my first page is an employee name. Thank you . jzwp22 I do have one additional question since you helped me with the main form of my project. I am only wanting the active employees to show on the form. Everything I am doing isn't showing those employees who are still active. Any suggestions.
 
Last edited:
Regarding the blank 1st page of the report; I did not have that happen in my version. You might check the parameters in the sorting/grouping section.

To filter your form's data, you can apply a filter in the On open event of the form. I assume that if the Active/term is checked, the employee is active. If that is the case then this filter should work.

DoCmd.ApplyFilter , "[Active/Term]=-1"

I've attached the DB
 

Attachments

I will give it a try it was really wierd I had all the same setting as in the one you sent me but it still ended up giving me a blank page at the beginning. It will work. I am just fine tuning now to how I want it to be displayed.
 
Any suggestions on how to combine employee and training reports onto one so that if I have an auditor come in and ask for an individual's training record everything would be in one report insted of two? I have been trying to figure this one out since last week and I am not getting anywhere.
 
You might have to approach this a little differently. I would be tempted to create a very simple report based on the employee table. Then create two additional reports, one for the qualifications (you already have) and another for the training. I would then embed these in the 1st report as subreports linked via the EmpID.
 
Last edited:
I just added three new employees and I am having to go into each table to update their information for their departmental training. I shouldn't be doing this should I? I have attached the database. I know that it has to be something simple. I also did figure out the report I cannot send a newer version of the database for some unknown reason. But I am able to create the new entry and then when I enter in Group Department and Job Title it automatically erases it and then I have to go into the tables to update everything or am I suppose to click the update query to have it do what I need it to do? I just tried a theory of running the query update but it duplicates every record is there a way to only run the update when a new person comes into the company without disturbing the other records?. Thanks.
 
Last edited:
I would recommend using a separate form for the entry of a new employee and then lead the user to another form to assign the job. You can then run an append query after the job title is saved to add the qualifications for that job to the employee. The append query I used for existing employees will have to be modified to handle just the 1 new employee. Check out the form frmNewEmployeeEntry in the attached database. Enter a new employee and see how it works.
 

Attachments

It works perfectly. It looks like I still have a lot to learn about this software. I may know the basics but this is what learning is all about. I understand what you have done and how you have done it. This will be a great replica for any future projects that I will possibly encounter. Thanks for all your hard work.:o:)
 
Glad to help out. Good luck on your project.
 
I did finally finish it with the thanks to you. I do have one additional question for you and I hope that it is a simple one. I have made modificatins to the Employee table I have added hyperlink fields to store PDF files for some of the employees. My question is (and I have been researching this for the past few days) how do I link them to each individual report if needed some employees have more than one link. Also would I also have to add new employee for a person who is cross trainied. I just tried to enter one and it did what the new employee opion did when I entered in the data.:o
 
Last edited:
What version of Access are you using? I ask, because in Access 2007 you can store more than one attachment per record. This is somewhat at odds with normalization rules, but it is available. If you are not using Access 2007 then you will have to approach it like any other one-to-many relationship.

tblEmpDocuments
-pkEmpDocsID primary key, autonumber
-fkEmpID foreign key to employee table
-linktodoc
 
I am running Access 2000. After I had posted my question I had a feeling I would have to set it up how you had suggested. I remember reading it somewhere that you cannot add PDF in earlier versions of Access. Funny part is that I was going to set it up simliar to how you had created the newemployee but would have the hyperlink field. I will give this all a try and see what happens. :):D
 
Also would I also have to add new employee for a person who is cross trainied. I just tried to enter one and it did what the new employee opion did when I entered in the data.:o
 

Users who are viewing this thread

Back
Top Bottom