Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with HasData property (code) 1

Status
Not open for further replies.

amcodah

Programmer
Jul 9, 2003
80
0
0
NO
Hi, I have a main_form and a sub_form. I want to hide a warning_textfield of the main_form if the sub_form has no data:

I've tried to add this code on the Report_Open event:

Private Sub Report_Open(Cancel As Integer)
If Me.rpt_subForm.Report.HasData = False Then
Me.Warningfield.Visible = False
End If
End Sub


But this won't work, if anyone could show me a working example I would appreciate it alot!
 
In your reports In design view go to
properties/events/On No Data
place the code
warningfield.Visible = True/false which ever

but I'm not too sure what your after

Hope this helps
Hymn
 
Oh yes! thanks alot ;) I'm so stupid.. I don't have the english language on this version of Access so I never found the On No Data event..

It worked like a charm, gave you a deserved star.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top