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'
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?
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?