Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / January 2006

Tip: Looking for answers? Try searching our database.

How to input text in Report Header on runtime, not from table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bstullos - 16 Jan 2006 21:10 GMT
I am prompting for input(the month) for the header, and it works unless the
results of the query has 0 records. Then it turns into an error. Is there
another way to do this?
Ofer - 16 Jan 2006 21:46 GMT
Use the OnNoData Property of the report to display a message that there is no
data, and then close the report

Private Sub Report_NoData(Cancel As Integer)
  MsgBox "No Data"
  Cancel = True
End Sub
Signature

\\// Live Long and Prosper \\//
BS"D

> I am prompting for input(the month) for the header, and it works unless the
> results of the query has 0 records. Then it turns into an error. Is there
> another way to do this?
bstullos - 16 Jan 2006 22:05 GMT
But I need the input(month) to actually print out for audit purposes to show
that I did run it, and that it was for the month that I entered. The report
works, and there are 0 records. The problem is that the header does not
display the month for which the report was run. It also comes up blank.

Any suggestions?

> I am prompting for input(the month) for the header, and it works unless the
> results of the query has 0 records. Then it turns into an error. Is there
> another way to do this?
Duane Hookom - 16 Jan 2006 22:18 GMT
Add an unbound text box to your report header and name it "txtMonth".
Then add code to the On Format event of the report header section.

   Me.txtMonth = InputBox("Enter Month")

Signature

Duane Hookom
MS Access MVP
--

> But I need the input(month) to actually print out for audit purposes to
> show
[quoted text clipped - 9 lines]
>> results of the query has 0 records. Then it turns into an error. Is there
>> another way to do this?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.