printing from an option box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Options 1 - 3 of an option box print three different "report sets". Option 4 enables a combo box which lists all reports from the MySysObjects table, essentially allowing the user to print one report when a "report set" isn't required

Options 1 - 3 are hard coded, which is fine. Option 4 needs to be something lik

Dim breport As Repor
Me.cbo_ReportSet.Value = brepor
basUtility.OpenPrintCloseReport "breport", acVtyp, , bPrint, bClos

?I am trying to read the selected value in the combo box to the VBA code - any brief explanation as to why the above isn't functioning correctl

Thank
 
Can't follow the attempt to assign an object that is Nothing to a combo box.

Try something like this:

Select Case Me.MyOptionGroup.Value
'cases 1 - 3 here
Case 4
If IsNull(Me.cboReport) Then
MsgBox "Select a report from the combo."
Else
DoCmd.OpenReport Me.cboCombo, acViewPreview
End If
End Select

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

JD said:
Options 1 - 3 of an option box print three different "report sets".
Option 4 enables a combo box which lists all reports from the MySysObjects
table, essentially allowing the user to print one report when a "report set"
isn't required.
Options 1 - 3 are hard coded, which is fine. Option 4 needs to be something like

Dim breport As Report
Me.cbo_ReportSet.Value = breport
basUtility.OpenPrintCloseReport "breport", acVtyp, , bPrint, bClose

?I am trying to read the selected value in the combo box to the VBA code -
any brief explanation as to why the above isn't functioning correctly
 
Back
Top