dbTalk Databases Forums  

using an option group and a list box to preview a report

comp.database.ms-access comp.database.ms-access


Discuss using an option group and a list box to preview a report in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sinead
 
Posts: n/a

Default using an option group and a list box to preview a report - 02-26-2004 , 05:03 AM






Hi, I am trying to bring up a report called "Job Details" when a
person clicks on the first option from an option group (called
ReportToPrint) and selects a job name from a list box (called
selectJobName) and clicks on a the button called "preview" on the form
called "Job Inquiries". Then the report should display the details
fot the particular job they have selected from the list box. Here
is the code for this button but the report is not displaying anything.
Any ideas??

Private Sub preview_Click()
On Error GoTo Err_preview_Click

Dim strWhereCategory As String

strWhereCategory = "JobName = Forms![Job Inquiries]!selectJobName"

Select Case Me!ReportToPrint
Case 1
DoCmd.OpenReport "Job Details", acPreview, , strWhereCategory
Case 2
DoCmd.OpenReport "Job Details", acPreview
End Select

Exit_preview_Click:
Exit Sub

Err_preview_Click:
MsgBox Err.Description
Resume Exit_preview_Click

End Sub

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.