Hi everyone,
I am doing a small exercise for opening report from my form based on report name as i have 100 reports so it need to be done very precisely however i have a table called tblRepots which has category, Reportname, and Reportlocation actually reportLocation is the real/saved name of report and Report name is the detailed name for users to open it from frmExtindividualRpts with btnPrintPreview.
Here is i have a code but unable to complete it, any help here will be much appreciated.
I need the else area code if all are correct then that specific report need to open, i dont know it can be done referencing the table field or any other method.
Thanks
I am doing a small exercise for opening report from my form based on report name as i have 100 reports so it need to be done very precisely however i have a table called tblRepots which has category, Reportname, and Reportlocation actually reportLocation is the real/saved name of report and Report name is the detailed name for users to open it from frmExtindividualRpts with btnPrintPreview.
Here is i have a code but unable to complete it, any help here will be much appreciated.
Code:
Private Sub BtnPrintPreview_Click()
On Error GoTo errhandlers:
'Check to see if data is entered into the Combo boxes or not.
If IsNull(Me.cboEmpId_RC) Or cboEmpId_RC = "" Then
MsgBox "You must select Employee ID !", vbOKOnly, "Required Data"
If IsNull(Me.cboCatagory) Or cboCatagory = "" Then
MsgBox "You must select Report Catagory !", vbOKOnly, "Required Data"
If IsNull(Me.cboReportName) Or cboReportName = "" Then
MsgBox "You must select Report name !", vbOKOnly, "Required Data"
Else
exit_errhandlers:Exit Sub
errhandlers:
MsgBox Err.Description, vbCritical
Err.Clear
End Sub
I need the else area code if all are correct then that specific report need to open, i dont know it can be done referencing the table field or any other method.
Thanks
Last edited: