Filter Form to only print selected record from button?

Fool_Working

New Member
Joined
Mar 23, 2006
Messages
31
I am making a questionaire form form for my company. Most of the people using the form are clueless about access.

The people filling out the questionaire want to be able to print out their answers after submitting, however the questionaire is to complicated to send to a report. I noticed you can print right from the form page, but when you hit print it tries to print every record in the set, instead of just the selected record unless you filter on the questionaire number.

I made a print button, but I am trying to auto filter the results to just print the selected questionaire when hit. However, I can't get the the filter code to work.

Here is my current code. When run I get the error: 'Applyfilter Action was canceled'

Code:
surveyID = Me.txtSurveyID.Value
  
    'set focus on form and then filter to selected survey
    With Forms!frmUserEditSurvey
        .SetFocus
        DoCmd.ApplyFilter , "pksurveyID = '" & surveyID & "'"

    End With

I've searched all through the archives here and through the microsoft help menu, but I still haven't been able to get this to work. Is this even possible?
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi

Why do you think the information is too complicated to be used in a report? If you can present the data in a form then you should be able to do it in a report.

Andrew
 
Upvote 0
print form

Here is what i usully do.

1 convert the form to a report,
2 make a parameter query relating the form for the report
3 have a a button labled "print this form" open the the report


Hop this helps.
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,361
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top