Embarassing

  • Thread starter Thread starter CAndrews
  • Start date Start date
C

CAndrews

Guest
I am not a programmer - but for some strange reason I am being asked to set up this new Access Database/application. Strange! Anyway, I am trying to set up a print button on the forms (with two sub-forms) I have designed, but when the user clicks the button, all of the records print. I used the "print record" wizard to create the record -was that not the right approach? Is this a problem with my page set up? Please help.......
 
This print button that you have setup is the correct approach. Reading your posting sounds as though you do not want to print all of the records perhaps seleted records instead, you already have a search form in place with your main form and two subforms - from here it is sometimes better to create a report to print off your results. You can create a query and base the report on this and if you only want to show certain records in the report to print you can enter criteria in the query or use a pop up form.

Hayley
 
Thank-you for getting back so soon, I think that would definitely be the best approach for the user. They want to print only the selected record, and it should look good as it is part of a mail out. Only one problem, I do not know how to create a query based on a form. I have been trying to do this - any hints?
 
To print only the record that the user is viewing I generally do the following.

As Hayley points out it can be easier to run a report to do this so I would build a query that emulates what you are showing using your form/subforms, then build the report from that query.

I would assume that the main form has some sort of unique identifier coming through from an underlying table.

In the query that you have just built go to that field and type in:

[forms]![your form name here]![the field name here]

When you press the button to fire the report, it will utilise the query narrowing down the choice to the record that is showing on your open form.
 
I feel daft, because I still do not know how to create a query from a form. Put a button on the form and run a macro? My form is based on 3 seperate tables and only two of those tables are linked by an identifier.
 
In your database window go to queries and create new, select the tables which contain the field names you eventually want to show in your report.

Go to reports tab in database window, create new using the wizard. Select the query that you just created as the reports record source.

Now all you have to do is put relevant criteria in your new query to enable your users to pull up the record(s) they want in the report then to print these records.

For examples of criteria search access help, there are plently of examples.

Hayley
 
Thanks for the help and patience, I can see I am doing a poor job of explaining my problem.....

I think the root of my problem I cannot save the selected or data entry information the user submits. Thus I cannot link a report or query to a table, nor print, because the information the user submits is not being saved anywhere. I truthfully think that if I can figure out how to save the form everything else will fall into place. And believe me I have tried!

The main form and sub-form 1 are based on tables 1 and 2 that are linked by a Number. The sub-forms 2 and 3 are based on a seperate table (3) that is not linked to table 1 and 2, but the user chooses important information relating to the main forms and needs to save to refer back - make a brand new record. I am using a combo box to populate the main form and sub-form 1 with the identifying information. That works well, except when I try to change the row source and control source to allow a save nothing works.

So then I tried to insert a save button, and tried everthing I could to get that to work -but it won't.

I thought perhaps the reason I cannot save is because my two tables weren't linked? Or perhaps there is save button code that I obviously don't know. I guess I want access to take a snapshot of the data entered, and save it to a brand new table. Am I asking too much?
 

Users who are viewing this thread

Back
Top Bottom