473,466 Members | 1,394 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

access report detail size fixing

5 New Member
I created an accounting package. In invoice, I summed up in report footer. I have to show 10 detail section records . there are 3 cases.
1 the bill has <10 records,
2. bill has =10records,
3.bill has >10 records.

the detail.forcenewsection=2 works fine with serial mod 10= 10 with if else statement . in 1 and 3 cases. but when there are exact 10 records, the report footer section goes to next page. .. I tried several if then else, if else select etc but noted that only first selection statement works then access' goes to sleep. I think access is lazy like me? Respected sir, I doubt I am missing something great. I am creating this great app for humanity. kindly show me the way.


regards.... Er. Kamal dev

code goes as:
Expand|Select|Wrap|Line Numbers
  1.  in "report_page()" event===>
  2. if serial mod 10 =0 then
  3. detail.forcenewsection=2
  4. else
  5. detail.forcenewsection=0
  6. end if
  7. end sub
  8.  
I am using a5 page and .25,.25,.17,.333 l,r,b,t margins
Aug 27 '17 #1
4 1645
NeoPa
32,556 Recognized Expert Moderator MVP
I get that if there are less than 10 items on the bill then there is no need for an extra page.
I get that if there are exactly 10 items on the bill then there is no need for an extra page either.
I'm not clear what you want if there are more than 10 items on the bill. Should it restrict it to showing just the 10? Should it run to another page?

This is your first post so I can tell you're new here. Great that you post your code in the [CODE] tags. It's also important to copy Paste the code from your project where possible. This ensures all who read it have confidence it's exactly as you say. When it's typed in there are many occasions when people find a problem, then they are told it's not a problem as it was only a typo. No typos with copying/pasting. Everybody's happier.

PS. Is that Dr. Kamal Dev or does Er. have a special meaning?
Aug 27 '17 #2
dev kamal
5 New Member
I did it . I used counter at report footer as rowcounter, serial as first increment field of the detail and used following code kindly note all Access designers. this code is necessary for Invoice designing. " Access 2016.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
  2. If rowcount.Value <= 10 Then
  3. Detail.ForceNewPage = 0
  4. Else
  5. Detail.ForceNewPage = IIf(SERIAL Mod 10 = 0, 2, 0)
  6. End If
  7. end sub
  8.  
Er= Engineer(B. Tech)
Aug 27 '17 #3
dev kamal
5 New Member
Furhter field in detail (=1) as serial and used them to bind 10 records in a5 sheet with TBLR margins (inches)= .336,.154,.19,.19 landscape.





well thanks for the reply..
Aug 27 '17 #4
NeoPa
32,556 Recognized Expert Moderator MVP
You don't answer my questions about what you actually want, but I suspect you may be interested to know that each Section in a Form or Report has a .WillContinue property that may be what you really need.

As your code is not copy/pasted (again) I can't even tell what the items SERIAL & rowcount refer to. The latter looks like it may be a property of something, but no properties are ever in all lower case, and the property isn't qualified. With reliable information I may have been able to deduce the answers to my questions for myself, and thus be able to help more. As it is, I'm left frustrated. Still not understanding what you've tried to ask for, in spite of my tips earlier on how to do it properly.

You sound like you are trying to be polite so I'm happy to excuse you on this occasion. Please try to pay attention to responses in future though. It benefits you as much as the person trying to assist you.
Aug 27 '17 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Nicola | last post by:
Hi Everyone, I am new to programming and would like to know how to open an access Report from within vb 6. I am trying to write a program to organise cross stitch threads. I have found out how...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
9
by: RMC | last post by:
Hello, I'm looking for a way to parse/format a memo field within a report. The Access 2000 database (application) has an equipment table that holds a memo field. Within the report, the memo...
0
by: Tim Marshall | last post by:
Access 2003. A report of mine was hanging on print preview. It turned out the issue was a bound text box where the data was too big to fit all on one page. When I changed the "keep together"...
4
by: narpet | last post by:
Hello all... My company generates reports in an Access database that are used as quotes for our customers. We have always then mailed (snail mail) the quotes to the customer. Now my boss wants...
1
by: JRNewKid | last post by:
I have an Access report. In the source table of data I have a check box, dlyBillCode, which is checked if I want that record to be included in the report. That dlyBillCode itself doesn't appear...
1
by: sonicfun2006 | last post by:
I have SQL Server Database and MS Access 2003 is connected with ODBC. I have very large amount of records in various tables. The database is very dynamic as it changes every minute. I’m trying to...
2
by: jmartmem | last post by:
Greetings, I have an Access report that contains a Page Header, Detail, Page Footer and Report Footer, My problem is that the subreport in the Detail section repeats over and over when I run the...
1
by: Marina Chitchi | last post by:
In detail section of access report I have txtProblem. I put a line under this text. I want to make line invisible if txtProblem is null and visible if it populated (by the recordsource.
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.