473,382 Members | 1,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Group as "000"

13
Could someone point me in the right direction for this:

I want to display groups of 1000 as a single number -- e.g., if my number is 28078, I want to display '28'....(I'm working on a report at the moment, but this will also apply to how items get displayed in textboxes on forms).

I'm not sure how to do this; it's not exactly rounding, and it's not exactly an input mask. I'd appreciate the help.

Thanks
Rosey
Jul 26 '07 #1
9 1251
JKing
1,206 Expert 1GB
You're basically dividing by 1000 and taking the integer value left.

Int( Field / 1000) should work to do this.

If field is 56021 dividing by 1000 would give you 56.021 and the Int Function would return only 56.
Jul 26 '07 #2
RoseM
13
Well...I guess it is rounding. Is there any way to do this without creating a new field (like by formatting what my existing textbox displays)?

There are many columns displaying the number of accounts overdue at specific time points (over 90 days, over 180 days, etc...). I'm manipulating a report from SAP, so I can't get at how overdue something is via calculations -- I don't have the date to increment from. So I'm stuck with all these columns...I'm just trying to avoid having to create all those additional columns to get at increments in the thousands.

Thanks
Jul 26 '07 #3
RoseM
13
Sorry JK--my post collided with yours...

Any shorter (lazier) way to do this?

Thanks
Jul 26 '07 #4
JKing
1,206 Expert 1GB
I just need to try to understand exactly what you're doing here. So your data is drawn from a SAP report. Are you placing this in a table in access and building forms off of that table to display overdude accounts and instead of showing a big long number you just want to display a smaller number representing the overdue accounts in 1000s.
Jul 26 '07 #5
RoseM
13
Right...in this case I'm looking to build a report that displays outstanding accounts by collector. This is what the header will look like:

Name ReportDate Over90 Over130 Over160 [etc...]

The report is run monthly and includes previous report dates, so we'll store the report in Access with the date the report was run, and over time the manager can see whether a collector trends up or down in a given bucket (I'm not arguing the efficacy here ;).

Your original answer is probably what I need to do--I just get a little frustrated at not being able to manipulate the SAP report and doing so much on the back end to make the reports useful.
Jul 26 '07 #6
JKing
1,206 Expert 1GB
Ok, but you do have a table in access storing the amount of overdue accounts for each time period.

So could you not create a query that would supply this information for your report?

Something like this:

Expand|Select|Wrap|Line Numbers
  1. SELECT Int([90DaysOverdue] / 1000) AS 90DaysOverBy1000 , Int([120DaysOverDue]/1000) As 120DaysOverBy1000
  2. FROM tblOverDueAccounts
  3.  
Then the calculation would be done within access and the fields would already be in the format for you on your report.
Jul 26 '07 #7
RoseM
13
I could try that. I've had a hard time understanding how to assign a recordset to a report, though.

I'm comfortable manipulating queries used by forms in SQL, but I've been using the query visual interface to build reports. When I need to assign a query to a report, I just create the query and call it by name. When I'm moving stuff around in a form or manipulating data in tables, I write out the SQL statement.

I guess in this case I'd attach that query to a button on the form, run it, then docmd.openreport or some such?

I know I'm missing something here. I'm new to building reports in Access and I'm still figuring things out philosophically (like do I want to use the visual interface versus writing in VBA? I do prefer to use code because I like the one-stop readability and transparency.)

Thanks for your insights.
Jul 26 '07 #8
JKing
1,206 Expert 1GB
What you can do is create the query with all the fields you need to be on the report and save it. Then use the report wizard to create a report based off that saved query. The report wizard gives you an option at the very start to select a query or a table from the drop down. You can then add code to a button to open the report you've saved.

The code will be fairly simple:
Expand|Select|Wrap|Line Numbers
  1. Private sub cmdPreviewReport_click
  2.  
  3. Docmd.OpenReport "rptAccountReport"
  4. End Sub
  5.  
Jul 26 '07 #9
RoseM
13
What you can do is create the query with all the fields you need to be on the report and save it.

Okay--thanks; I'll give it a shot.
Jul 26 '07 #10

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

Similar topics

6
by: Fabrice Régnier | last post by:
Hi ;) Everything is in the title. the prob is "boo" is displayed ! Can you believe it ? Thanx for anyone who can help me. fabrice.
4
by: Casper | last post by:
Is there features/containers of standard C++ or the STL which will assist in minimizing memmory fragmentation upon creation of a huge ammount of objects on the heap? Currently my application...
1
by: Norbert Munkel | last post by:
Hi, System: 8.1.5 UDB on SuSE Linux I created a new SMS tablespace with following ddl: CREATE REGULAR TABLESPACE ASNCTL IN DATABASE PARTITION GROUP IBMDEFAULTGROUP PAGESIZE 4096 MANAGED BY...
0
by: Peter | last post by:
When I issue call sqlj.install_jar('file:///f:/jars/mail.jar','MAIL'); I get the messages SQL4301N Java or .NET interpreter startup or communication failed, reason
11
by: Shane Suebsahakarn | last post by:
Hi all, This might be one of those things for which there is no workaround. I'm using A2K2, and using it to perform a very large batch ouput. Both the front and back ends are MDB files, so no...
8
by: jchludzinski | last post by:
Is there a format specification for printf that will result in: 1000000 being printed as 1,000,000? Or 1000000.0 as 1,000,000.0? ---John
19
by: (PeteCresswell) | last post by:
I'm going over an application written by somebody else and have encountered what looks to me like nested "With"s. Is this something new with MS Access 2003 or am I losing it? Seems to me that...
9
by: ganesh4all | last post by:
Hi: I am trying to connect to DB with the following command db2 connect to <dbnameuser <usernameusing <password> It throws the following exception SQL1337N The service "db2inst1" was not...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.