Use the "on no data" event procedure and you can get rid of that problem by
only displaying a msgbox that there is no data for the report or nothing.
Simply open the report in design view, on reports properties and go to
"Event" tab. then write the event procedure as below: -
Private Sub Report_NoData(Cancel As Integer)
On Error GoTo error_Report_NoData
I couldn't see a 'force new page' property...
Under format I have
- Caption
- Auto resize
- Auto center
- Page header
- Page footer
- Grp keep together
- Border style
- Control box
- Min max buttons
- Close button
- Width
- Picture
- Picture type
- Picture size mode
- Picture alignment
- Picture tiling
- Picture pages
- Grid X
- Grid Y
- Layout for print
- Palette source
- Orientation
- Moveable
Just open the report in design view, then do as followings:-
1. Right Click on the blank area (shaded area, other than report area) of
the report by scrolling the horizontal scroll bar to downwards.
2. Select the "Properties".
3. The report property window will be opened.
a. You can open this property window by double clicking on the shaded
area.
4. On 3rd tab (Event), you will find the following:-
a. On Open
b. On Close
c. On Activate
d. On Deactivate
e. On No Data (Thats what, you are looking for...)
f. On Page
h. On error
5. Click the drop down menu corrospondant to "On No Data" and select [Event
Procedure].
6. Then click on the right side button shaping "...".
7. The VB Editor will be opened and write the script as i send to you before.
ALI
MS Access Developer
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.