Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autoreporting?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have been designing a database that allows users to look up various data on our products, such as location, inventory, vendors, etc. I have a main window which allows a user to enter an item number and click on a button to open a form based on the selection. What I would like to do, is have a function on the new form which allows the user to run a report from the data. Is there a function to do this? <p>John Vogel<br><a href=mailto:johnvogel@homepage.com>johnvogel@homepage.com</a><br><a href= HomePage</a><br>WebMaster - DataBase Administrator - Programmer<br>
 
To automate a report try the following<br>
<br>
In design view click on the command button.<br>
Draw the button onto your form.<br>
Following the wizard for the rest of it as follows:<br>
Select report operations<br>
In the actions window select preview report (to have the user view it onscreen before it is printed) or print report (sends it directly to the printer)<br>
Click next<br>
Scroll down till you find the report that you want to have printed and click on it.<br>
Click next<br>
Select text: and write in a description of the report to print <br>
Or<br>
Select picture and highlight the pics you want to appear on the button.<br>
Click next<br>
Key in a phrase which identifies the button. (important, you will need to know this at some later date)<br>
Click finish.<br>
Save your form.<br>
Then preview and test it out.<br>
<br>
This works for me.<br>
<br>

 
Absolutely,<br>
First how are you passing the single record to the form.<br>
By SQL code or what.<br>
One way is create a new query with the information you need on your report<br>
Then one field in your query which uniquely identifies that record has the forms field in it<br>
Example in your query StudentID is a unique field<br>
In your query StudentID will contain this code<br>
Forms![Formname]![StudentID]<br>
<br>
Run your query you should see just the record(s) on your form<br>
Next close your query and save it<br>
Highlight it then Click “Insert” menu and AutoReport (at the bottom)<br>
It will make a report<br>
Next open your form in design view add an new button<br>
Click Report Operations in categories list<br>
Click “Preview report” in other list<br>
Click NEXT button<br>
Find your newly created report highlight it.<br>
Click NEXT<br>
Follow prompts<br>
Bingo you have a report button in a snap.<br>

 
Thanks for the replies. I think you have something here, doug, but unfortunatley I still can't get it to work. Actually, what I am having trouble with is the first part of your solution, how can I JUST retrieve the records from the form, without having to load all record in the table. I tried to use the Forms![Formname]![FormField] method, but Access says I need to select at least on table to run the query, which in effect pulls in all 7178 records from the table, regardless of the fact that I ONLY used the form method. <p>John Vogel<br><a href=mailto:johnvogel@homepage.com>johnvogel@homepage.com</a><br><a href= HomePage</a><br>WebMaster - DataBase Administrator - Programmer<br>
 
1st the form has to be open and on the record you want.<br>
Your query has the forms field in it right?<br>
In other words your table has a field called &quot;StudentID&quot;<br>
the form has a field called &quot;StudentID&quot; on it<br>
Also make sure in the properties of the textbox on the form that the &quot;Name&quot; property is the same as the &quot;Control source&quot; in our case StudentID<br>
<br>
Now your query has to have a field called &quot;StudentID&quot;.<br>
In your query the StudentID fields &quot;criteria&quot; has to be [Forms]![Form1]![StudentID] where &quot;form1&quot; is the forms exact name <br>
<br>
Put the forms fields name on here so we can talk on the same line instead of generalities.<br>

 
Thanks a bundle, Doug. It's working great now. I think you just saved my sanity!!! Thanks again, oh wise and wonderfull tipmaster :)<br>
<br>
God Bless, <p>John Vogel<br><a href=mailto:johnvogel@homepage.com>johnvogel@homepage.com</a><br><a href= HomePage</a><br>WebMaster - DataBase Administrator - Programmer<br>
 
Well you are more than welcome.<br>
I enjoy helping others.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top