Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 31st, 2004, 09:22 AM
Authorized User
 
Join Date: Jan 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Generating a report from more than one query

Hi

I want to generate a dynamic report that based on as specific set of queries.

At the moment each query exists as as subform in the report but some queries contain no data. Therefore I need the report to say something like (data contained within are from survey forms) "no replies to this question".

Could I use an IIF statement or would a VBA function work better. Would prefer to use VBA unsure how to go about it.

Many thanks
 
Old March 31st, 2004, 06:46 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Your best bet would probably be using the NoData event.
For example, you could have a label that is dependent on if there is data or not.

such as:
Code:
Private Sub Report_NoData(Cancel As Integer)
LabelX.Caption = "No replies to this question"
End Sub
Or have that label's visibility be based on the NoData
Eg: have it as Visible=False, then for the NoData event, have
Code:
Private Sub Report_NoData(Cancel As Integer)
LabelX.Visible = True
End Sub
I am a loud man with a very large hat. This means I am in charge





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using sql express for generating the report !! alam1 Reporting Services 0 May 26th, 2007 11:11 PM
Generating a report from a combo box toddw607 Access 7 March 26th, 2007 12:38 PM
Is database necessary for generating report. radhekrishna BOOK: Professional Crystal Reports for VS.NET 0 January 8th, 2007 06:10 AM
Generating and loading report method Access 1 June 28th, 2005 10:45 AM
Generating a report from 'after update' fixitman Access VBA 5 August 30th, 2003 06:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.