MS Access question

   / MS Access question #1  

Richard

Elite Member
Joined
Apr 6, 2000
Messages
4,997
Location
Knoxville, TN
Tractor
International 1066 Full sized JCB Loader/Backhoe and a John Deere 430 to mow with
I do not "know" Access, but am self taught to the degree I can muddle through it on a VERY basic level.

Upshot, I'm making a database for a friend who does boat evaluations. It has a 3 page report that get's printed out. It might grow to 4 pages.

I have most of the data in there and am currently tweeking some of the fields (to a yes/no, or FROM a yes/no) depending on his specific desires.

Upshot, I have a print preview button, and a print button, but the print button wants to print ALL of the records and I only want the currently viewed record printed.

How do I have the program print only the viewed file at a time?

Richard
 
   / MS Access question #2  
Richard ... you can print 1 page at a time through the print setup [right click on a report preview, select print, then select the number of pages you want to print.] This assumes that the entire record you're interested in fits into a single report page.

Other than that, you will have to create some code that only fetches one record at a time on one report page.

MSAccess, being what it is, oft abused, has numerous limitations.

Hope this helps ... /forums/images/graemlins/smirk.gif
 
   / MS Access question
  • Thread Starter
#3  
Let me clarify then and see if I'm trying something beyond it's scope.

I'm trying to make this dumbed down so anyone can see how easy it is to use. /forums/images/graemlins/crazy.gif

I have one "main page" that contains some critical info like name, address...

Then I have some radio buttons, 19 of them, that open up specific subforms. I did it this way so that the subforms will contain only the data in that topic ("general layout vs fuel systems)

Each subform is fairly small and has a "close" button on it to take the user back to the main page.

Below the radio buttons on the main page, I have a print preview and a print form button. The logic is, the user will simply go down the radio buttons, as he does so, the form will be filled out. He closes the last form and can either preview his current evaluation, or he can simply print it.

But, to hit the print button will cause ALL of the previous evaluations to also print out. Currently, I told him the way around this is to simply save the datafile "as" and give it the boat owners name. The downside is he's going to have a lot of files when in fact, he could have a single file.

I'm not even sure a database is the BEST thing he can use, but it will allow him to automate and simplify much of what he's trying to do, so we're going with it.

As far as creating code... you left me in the dust /forums/images/graemlins/grin.gif

Each record will print out on (currently) 3 pages and it's possible it will grow to four pages as I tweek the print results as per his desires.

Richard
 
   / MS Access question #4  
Richard .. Without being able to see your user interface, and reading your description, I can make a couple of suggestions, based on my limited understanding of your app.

1. MSAccess and its report functionality, unless you tell it otherwise (through written software code, SQL or through macros) will print the entire contents of a table. This seems to be your problem. You're going to have to intervene somehow. A solution (and you're not gonna like it), is to create an empty copy of your table and populate it temporarilty with one evaluations worth of data for printing purposes. That too will require some extra work. Sounds like it might be out of scope. /forums/images/graemlins/cool.gif

2. Also, I would strongly suggest to you that you do NOT use radio buttons to open up sub forms. Radio buttons, if we're talking about the same things (a circle with a black dot) is meant to be used for "flagging" or setting the state of a group of objects - the best analogy being selecting a single answer from a multiple choice question. If you want to open sub forms via a mouse click, use a standard push button with an appropriate label like .. "Open Fuel Specs Form" .... etc.

The can is open and the worms are swarming. /forums/images/graemlins/wink.gif
 
   / MS Access question #5  
Also, not being sure of your application, when I have lots of data, I put the main data at the top of the form, and then at the bottom half of the form put tabbed pages, with each tab having a logical subset of the data.

Not an answer to your printing issue, but an alternative to radio buttons. (We're good at giving suggestions to problems you don't inquire about ! ) The printing issue may require some short Visual Basic program code to select just the one record before printing. This code would be linked to your button and run when it is clicked.
 
   / MS Access question #6  
As Doug said you will have to create a query which only selects the records based on the id or key field on the screen at that point. You will then need to change the source of your report from the table to that of the query you just created. Sounds more complicated then it really is.
 
   / MS Access question
  • Thread Starter
#7  
lol.. ok, radio buttons was wrong word. I mean the push buttons is what I used and they are automatically programmed to open/close/other any form as I create them.

I'll re-read the other stuff & see if I can make sense. Might be just as easy to have him make a new file (save as) for each one. He said he didn't mind doing that, as it woudl allow him to see them all on his pc at once if he needed them.

I'm just trying to make it as good as I can, given my limited abilities.

Thanks

Richard
 
   / MS Access question #8  
When you have the record open that you want to print, can't you just go to the File pull down menu and select Print. That opens up the Print dialog box. By default in the Print Range section of that dialog box, there should be a radio button selected for All. Two radio buttons down is the Selected Record(s) button. Push that. Only your selected record should print.
 
   / MS Access question #9  
Is that your attempting to print the partial contents of a page or 1 page of many.? It sounds like the first scenario. If so use a query to create a page with the contents you want to print is the only way to do it. Or then again I may have this all wrong on my assumptions. /forums/images/graemlins/crazy.gif
 
   / MS Access question
  • Thread Starter
#10  
lol now I know why I am not a programmer, I'm easily lost.

I am making a database, who's report will be a very detailed appraisal of a boat.

The printed report will be (currently) 3 pages and might possibly grow to 4 pages.

When the "print" button is pushed (command in the field, not the print command on the "file/menu" bar), the goal is to have the result be a printing of the current (showing) record, and have the entire 3 or 4 page report print.

The (my) logic is, the app starts, you are at a "home page" that you can direct to each subform. when done, you are returned back to this main page (this part is already done) When on this main page, you can then hit "print report" and have ONLY those 3 or 4 report pages relating to the currently showing record print. There would be no foreseeable reason to have reports for ALL the records print.

What seems to happen, is if I have 10 records in there, I can (currently) count on a 30 page print and I only need the 3 pages related to the most recently input apprasial.

The answer might be I'm outta luck... I just figured I'd ask here & see if I got any thoughts.

I'm at home and it's at work, so I'll go look into a query, though my guess is, if THAT is the answer, I'll need to re-do much of what I've already done. (since the report is already constructed)

Richard
 

Tractor & Equipment Auctions

2011 Ford F-150 4x4 Ext. Cab Pickup Truck (A50323)
2011 Ford F-150...
2018 VOLVO VNL DAY CAB (A52576)
2018 VOLVO VNL DAY...
2007 JOHN DEERE 624J WHEEL LOADER (A51406)
2007 JOHN DEERE...
1991 Peterbilt 378 T/A Dump Truck (A50323)
1991 Peterbilt 378...
2020 Featherlite Aluminum Stock Trailer (A52384)
2020 Featherlite...
2007 Ford F-150 4x4 Ext. Cab Pickup Truck (A50323)
2007 Ford F-150...
 
Top