My Assistant
|
|
Mar 26 2012, 03:52 AM
Post
#1
|
|
|
New Member Posts: 12 |
Hi All,
I have a continuous form with a selection of unbound combo boxes which when selected alter the on screen results accordingly! These combo boxes filter each result by category or name or type etc. so once the relevant options are selected the continuous form results are displayed! The problem i have is that i can not print the on screen results! Everytime i do a Preview (using the AcViewpreview command) i only get the whole list of results not what i see on the form! I have tried applying the filter after the preview command e.g. DoCmd.OpenReport "List Report", acViewPreview, DoFilter (DoFilter being the filter string that filters the combo boxes) but this doesnt work! I can not add Where conditions as this report will be different every time that the user prints it depending on the options that they select! Can anyone help please? |
|
|
|
![]() |
Mar 26 2012, 04:14 AM
Post
#2
|
|
|
UtterAccess Ruler Posts: 1,291 From: Kampala,Uganda The Pearl of Africa |
Hi All, I have a continuous form with a selection of unbound combo boxes which when selected alter the on screen results accordingly! These combo boxes filter each result by category or name or type etc. so once the relevant options are selected the continuous form results are displayed! The problem i have is that i can not print the on screen results! Everytime i do a Preview (using the AcViewpreview command) i only get the whole list of results not what i see on the form! I have tried applying the filter after the preview command e.g. DoCmd.OpenReport "List Report", acViewPreview, DoFilter (DoFilter being the filter string that filters the combo boxes) but this doesnt work! I can not add Where conditions as this report will be different every time that the user prints it depending on the options that they select! Can anyone help please? Hello I also filter a continuous form and print report using a button. See how to adopt it to your situation CODE Private Sub Command25_Click() On Error GoTo cmdPrintErr Dim frm As Form Set frm = Forms!frmUnionAllTrans If frm.FilterOn Then DoCmd.OpenReport "rptUnionAllTransVote", acViewPreview, , frm.Filter Else DoCmd.OpenReport "rptUnionAllTransVote", acViewPreview End If Command25_Exit: Exit Sub cmdPrintErr: MsgBox " err" & Err.Description Resume Command25_Exit End Sub Ronald |
|
|
|
Mar 29 2012, 03:26 AM
Post
#3
|
|
|
New Member Posts: 12 |
Hi Ronald,
Your solution worked great, Just tweaked the names of my forms and reports and it printed fine! Many thanks for your help !! |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 23rd May 2013 - 04:52 AM |