A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

HasData Issue



 
 
Thread Tools Display Modes
  #1  
Old February 14th, 2006, 11:45 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default 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

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 Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 09:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.