If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
HasData Issue
Hi All,
I have the following code located in the On Format of a report which works great. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.HasData Then If Me.Total_Loss.Value = "NO" Then Me.lblTotal_Loss.Visible = False Else Me.lblTotal_Loss.Visible = True End If If Me.GST = "YES" Then Me![ITCABN].Visible = True Else Me![ITCABN].Visible = False End If End If End Sub I have another report that the HasData doesnt work on and i'm confused as to what is causing the problem. Here is the code. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Me.HasData Then If IsNull(Me!OSurname) Or Me!OSurname = 0 Then Me!Dear.Visible = False Me!ODName.Visible = False Me!Label11.Visible = True Me!OCompany.Visible = True Else Me!Dear.Visible = True Me!ODName.Visible = True Me!Label11.Visible = False Me!OCompany.Visible = False End If End If End Sub My report relies on a subform "invoice" within a form "claim form", if there's no record in the subform "invoice" then i get errors on the report, but when i added the HasData line to the above code it works perfectly and both reports rely on the same subform "invoice" Can anyone assist? Greg. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Font list box issue | Jeffrey Millar | Powerpoint | 9 | February 4th, 2006 05:34 PM |
Wrap Text issue | jsAlpha | General Discussion | 2 | January 5th, 2006 01:56 PM |
Office 2003 on Win XP -hour glass issue -HELP! | jonpdavies | Setup, Installing & Configuration | 0 | December 11th, 2005 08:33 AM |
Outlook 2000 Calendar Display Issue | sampath | Calendar | 3 | November 24th, 2005 12:56 PM |
Testing subreport for HasData | WB | Setting Up & Running Reports | 1 | April 15th, 2005 11:49 PM |