load print wizard after clicking command button

NewfieSarah

Registered User.
Local time
Today, 06:47
Joined
Feb 11, 2005
Messages
193
hey all, I am trying to load a print wizard after clicking on a command button. I am trying to use my filtered data to select specific fields to print. On the fly kind of report. I need to have the ability to use my filtered data to create a specific report. Any ideas?? Thanks
 
Opening Print Dialouge

you can use this function

Function OpenPrint_Dialouge()
On Error GoTo Err_OpenPrint

DoCmd.SelectObject acReport, Screen.ActiveReport.Name
DoCmd.RunCommand acCmdPrint

Exit_OpenPrint_Dialouge:
Exit Function

Err_OpenPrint:
If Err = 2501 Then
Resume Next
Else
MsgBox Err.Description, 16, "PWD Accounts"
End If
Resume Exit_OpenPrint_Dialouge
End Function


rahulgty
 
So what is this function doing??
 
Actually what I was looking for for was a Report wizard pop-up and well I have it. Which is awsome, now I just need to know how I can use my filtered data with the report wizard. For this i created a macro and then converted it to a module. The code I got was:
Code:
Function reportwizard()
On Error GoTo reportwizard_Err
        
        DoCmd.RunCommand acCmdNewObjectReport


reportwizard_Exit:
    Exit Function

reportwizard_Err:
    MsgBox Error$
    Resume reportwizard_Exit

End Function

=

Anyone have any ideas??
 
This function is the answer of your first line i.e.

hey all, I am trying to load a print wizard after clicking on a command button.

Rest of your question is not too clear to understand.

rahulgty
 
yeah however I tryed your code and I need a report for it to work! isnt that what this is: DoCmd.SelectObject acReport, Screen.ActiveReport.Name
Sorry that i wasnt clear in my first post, Well lets start over... I have a database created with forms that contain filtered data, Now I would like to creat reports for printing on the fly. So I may only have a report with 3 fields, today and 7 tomorrow and next week I might need 15 fields and then I might need all 30. So I would like to create a report on the fly depending on what I need. So I though I good way would be a report wizard. So I have a report wizard come up and then create a report. However the report is going on all the records in the table, now the filtered ones on my form. Is that better?? Thanks
 
you do one thing, load your application, I will try to solve your problem, if you have yahoo u can chat with me
 
sorry I cant load my application! I have a yahoo account, and hotmail but not yahoo messenger! MSN Messenger! Plus there is nothing on my application yet, I am trying to figure out what to put on it for my issue! Thanks
 

Users who are viewing this thread

Back
Top Bottom