473,785 Members | 2,283 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sum(or Group By) in Query causing weird characters

5 New Member
Hello~
Help Please~
I am new to Access, so am a little behind the learning curve. I have a query that I have been running for a while that has worked fine and now (with no changes) is throwing up weird characters(like little blocks) in the Item Note field.
(Note : don't know if this infomation is important the only other thing I can think of that has changed in the last month is the size of the database which is 456M and links to 3 other databases smaller in size.)
This is in Access 2000, Windows XP

The query groups items together for each property and if they are the same item sums the number of items. The query works fine if I turn off the Group by(of course it lists all items and no sum)
Here is the SQL view (with out sum on):

SELECT [Property Charges Monthly].[Property Number], [Property Charges Monthly].[Item Title], [Property Charges Monthly].[Item Note], [Property Charges Monthly].[Number Of Items], [Property Charges Monthly].[Item Charge], [Property Charges Monthly].[Price for Misc Items], [SumOfNumber Of Items]*(IIf([Price for Misc Items]=0,[Property Charges Monthly]![Item Charge],[Property Charges Monthly]![Price for Misc Items])) AS Expr2, ItemLookUp.[Maintenance Charge], ItemLookUp.[Cleaning Charge], ItemLookUp.[Specialty Charge], ItemLookUp.[Supplies Charge], ItemLookUp.[Spring Cleaning Charge], ItemLookUp.ADJU STMENTS, [Statement Month] AS Expr3
FROM ItemLookUp INNER JOIN [Property Charges Monthly] ON ItemLookUp.[Item Title] = [Property Charges Monthly].[Item Title]
WHERE ((([Property Charges Monthly].[Number Of Items])<>0))
ORDER BY [Property Charges Monthly].[Property Number], [Property Charges Monthly].[Item Title];

and here is the SQL View with sum turned on:

SELECT [Property Charges Monthly].[Property Number], [Property Charges Monthly].[Item Title], [Property Charges Monthly].[Item Note], Sum([Property Charges Monthly].[Number Of Items]) AS [SumOfNumber Of Items], [Property Charges Monthly].[Item Charge], [Property Charges Monthly].[Price for Misc Items], [SumOfNumber Of Items]*(IIf([Price for Misc Items]=0,[Property Charges Monthly]![Item Charge],[Property Charges Monthly]![Price for Misc Items])) AS Expr2, ItemLookUp.[Maintenance Charge], ItemLookUp.[Cleaning Charge], ItemLookUp.[Specialty Charge], ItemLookUp.[Supplies Charge], ItemLookUp.[Spring Cleaning Charge], ItemLookUp.ADJU STMENTS, [Statement Month] AS Expr3
FROM ItemLookUp INNER JOIN [Property Charges Monthly] ON ItemLookUp.[Item Title] = [Property Charges Monthly].[Item Title]
GROUP BY [Property Charges Monthly].[Property Number], [Property Charges Monthly].[Item Title], [Property Charges Monthly].[Item Note], [Property Charges Monthly].[Item Charge], [Property Charges Monthly].[Price for Misc Items], ItemLookUp.[Maintenance Charge], ItemLookUp.[Cleaning Charge], ItemLookUp.[Specialty Charge], ItemLookUp.[Supplies Charge], ItemLookUp.[Spring Cleaning Charge], ItemLookUp.ADJU STMENTS
HAVING (((Sum([Property Charges Monthly].[Number Of Items]))<>0))
ORDER BY [Property Charges Monthly].[Property Number], [Property Charges Monthly].[Item Title];
Dec 5 '06 #1
11 2875
NeoPa
32,578 Recognized Expert Moderator MVP
Funny block characters normally indicate that you have some non-printable characters in your data (Nulls; HTs; VTs; etc).
These would, however, show whether grouped or not.
As you're grouping by the [Item Note] field itself, I can see no reason why it would behave differently when grouped. Sorry.
Dec 6 '06 #2
MMcCarthy
14,534 Recognized Expert Moderator MVP
Funny block characters normally indicate that you have some non-printable characters in your data (Nulls; HTs; VTs; etc).
These would, however, show whether grouped or not.
As you're grouping by the [Item Note] field itself, I can see no reason why it would behave differently when grouped. Sorry.
If it's a memo data type this would be a problem.

Mary
Dec 6 '06 #3
Petulant
5 New Member
Thanks for your responses, NeoPa and Mary!
Item Note is a Memo type- can I fix this? Why would Memo type cause a problem?
Dec 6 '06 #4
MMcCarthy
14,534 Recognized Expert Moderator MVP
Thanks for your responses, NeoPa and Mary!
Item Note is a Memo type- can I fix this? Why would Memo type cause a problem?
Memo types should only be used to store strings of large sizes where it's unavoidable. They are very difficult to query on. Also users are inclined to use carriage ruturns (paragraph characters) in Memo fields and Access doesn't like them. You will need to try to replace them all with vbCrLf which is the line feed in VBA. But this won't stop users doing it again.

The rule is don't use memo fields unless absolutely necessary and only for things like comments and notes.

Mary
Dec 6 '06 #5
Petulant
5 New Member
would the carriage return cause the squares? should I try to retype all the notes?
Dec 6 '06 #6
MMcCarthy
14,534 Recognized Expert Moderator MVP
would the carriage return cause the squares? should I try to retype all the notes?
Whatever is the easiest way to remove the carriage returns.

Mary
Dec 6 '06 #7
NeoPa
32,578 Recognized Expert Moderator MVP
would the carriage return cause the squares? should I try to retype all the notes?
A Carriage Return == Chr(0x0D) == VbCr
A Line Feed == Chr(0x0A) == VbLf
A Carriage Return / Line Feed sequence == VbCr & VbLf == VbCrLf
Because records are already tabulated generally (displayed along one row) the showing of any of these could cause the record type display to go wrong, so they show a replacement character (block) instead.
Dec 6 '06 #8
Petulant
5 New Member
Mary~
Well it was a lot of typing, but I redid all the memos (and made sure all the blank ones were blank) but I'm still having the problem! AHHHHH! Any other suggestions?
Dec 6 '06 #9
MMcCarthy
14,534 Recognized Expert Moderator MVP
I don't think you can group on memo fields in aggregate queries (with sum, count, etc.).

Mary
Dec 6 '06 #10

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

Similar topics

2
3425
by: tedhekman | last post by:
Hi there! I am pretty new to Access, have been loving learning it! I have a problem here I can't even begin to figure out. Here is what I need: Given 1 Date and 1 Store, retrieve the following information: 1. # of each product sold in STORE for DATE, and for the 3 days prior to DATE 2. Sum # of each product sold in STORE for days 5-8 previous to DATE 3. Sum # of each product sold in STORE for days 9-12 previous to DATE 4. Sum # of each...
1
1645
by: Tempy | last post by:
Hi all, i am a newbie to this game and want to know if it is possible with VBA to count up all the rows for a specific field for a table or average or sum ? If it is possible, could you help me with some code please. I add up fields succesfully with the following :- myLcPo = Nz(DSum("", _
3
5152
by: Pecanfan | last post by:
Hi, I've got an access report which contains a sub-report. The sub-report contains various items in a group Footer which culminates in a running sum text box called txtGrandTotal. I want to use this 'total' in the main report so I have a text box with the following:- =(!!.!) For some reason, which I'm sure is perfectly obvious but I'm buggered if I
4
320
by: rburdette | last post by:
I need to do a sum of rows and sum of columns in Visual Basic. Is there another way to do it other than the one I have below? 5 7 3 9 12 4 8 9 13 4 0 -`1 -7 13 8 4 4 4 4 0 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
0
1505
by: dcs | last post by:
I created basic MS Access form, which allows me to log procedures by clicking checkboxes. I need to submit a total or count of my procedures and I would like to create a report in order to do this. I have tried to create query "group by" the field, and also "count" the same field but gives me a -1 value; I also tried Create new columns and place this text in the column header(s). checksum1: iif( = true,1,0) repeat for every checkbox you...
1
1968
by: jmarr02s | last post by:
The database I am working with contains a field with as many as 12 different values (09,10,11,12,13,14,15,16,17,18,19,20) My end user has requested that the number of times these 12 different values appear in the table be grouped in the following 8 groups (15 or 19), (13 or 17), (16 or 20), (14 or 18), (09), (11), (12), (10) That is, for example, the end user wants the combined count for the total number of times (15 or 19) appears in...
7
1497
by: anonymous | last post by:
I need a help with forming a query for the following table.. Customerid Amnt Mode 1 200 Internet 2 100 Internet 3 900 ATM 1 300 ATM 1 90 Internet 4 10000 ATM 2 500 ...
0
1160
by: pcross29 | last post by:
I've got a table that has 3 fields: CarModel, CarColor and CarRegistration. I want to summarize the number of records by CarModel and CarColor. Easy with a sum query: Group By fields CarColor and CarRegistration and do a count on CarRegristration. But what if I want to combine 2 car colors, eg. Red and Blue? I want the count of all the other colors still, but just want Red and Blue count combined. Any way to do this with one query?
4
1426
by: mezzanine1974 | last post by:
Say that we have a table with two fields (Date, Money). Suppose that date increase sequentally and some "Money" value corresponds to each date in a row. I need to run a query in which i can a have a column to provide me Sum_of_Money till each date seperately. Output will be something as below. Date Money Sum_of_Total 01-01-2008 100$ 100$ 02-01-2008 3$ 103$ 03-01-2008 20$ ...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9489
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9959
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6744
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5396
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4063
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 we have to send another system
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2893
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.