473,499 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

String up to 2048 characters long??

14 New Member
Hi all,

This is based off of a previous thread that I had but it's a whole new problem. I'm entering a DSum formula into a text box on a report and I keep getting an error message back saying:

The expression you entered has an invalid string.
A string can be up to 2048 characters long, including opening and closing quotation marks.

The funny thing is that the formula that I've entered that is apparently too long only has 156 characters in it. Why am I getting this message? Is there anything I can do to get around the problem? I'm so close to finishing this database, I just need to get past this one last problem.
Oct 5 '07 #1
4 13123
missinglinq
3,532 Recognized Expert Specialist
We'll need to see the string!

Linq ;0)>
Oct 5 '07 #2
BlackJack17
14 New Member
Sorry about that, I meant to put in in the last post. Must have been too excited to hit submit.

Here's the string:

=DSum("[Trial Balance Amount]","DDRS Data","[Acct] = " & [Acct] & " AND [Program Description]= '" & [Program Description] & "'" AND [Fed]= '" & [Fed] & "'")

Like I said, it's telling me that strings can only be 2,048 characters long, but this is 155 or 156. It's going to get longer as I add more elements, but it should still be less than 1,000. Any ideas?
Oct 5 '07 #3
nico5038
3,080 Recognized Expert Specialist
The error is cause because there is an error in the number of quotes and Access can't find the end.
Try:
Expand|Select|Wrap|Line Numbers
  1. =DSum("[Trial Balance Amount]","DDRS Data","[Acct] = " & [Acct] & " AND [Program Description]= '" & [Program Description] & "' AND [Fed]= '" & [Fed] & "'")
  2.  
The " before the AND in [Program Description] & "'" AND has been removed.

Nic;o)
Oct 5 '07 #4
BlackJack17
14 New Member
Great. Thanks for all the help! I should be good to go now.
Oct 5 '07 #5

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

Similar topics

5
14019
by: Belinda | last post by:
Hello All I have the following test.asp page which needs one parameter querystr but my querystr is a very long string value. When I send a long value the query string is getting truncated after...
5
128940
by: Wade G. Pemberton | last post by:
Can't find it quickly in the reference books.
5
6795
by: MLH | last post by:
This property is only available only when the control has the focus... Error #2185 I get the above error when code running in FormA is trying to set the value of a hidden textbox on FormB to a...
3
2834
by: MLH | last post by:
I'm having trouble pasting a VLS into a textbox control on FormB. FormB is open in form view. I'm trying to do it from a procedure running in FormA. I'm up against 2048-Char limits no matter how...
2
5016
by: Salad | last post by:
I have a log file with a list of records. The log file can be unfiltered or filtered. I have a command button to call a data entry form from the log. At first I was only going to present the...
24
9016
by: John Smith | last post by:
I want to shorten a string by replacing the last character by '\0'. The following code displays the string. It works fine. It's in a loop and different strings are displayed without problems....
10
2350
by: jt | last post by:
I'm needing to take a binary string start at a certain position and return a pointer from that postion to the end of the binary stirng. something like this: char bstr; char *pos; ...
32
14760
by: tshad | last post by:
Can you do a search for more that one string in another string? Something like: someString.IndexOf("something1","something2","something3",0) or would you have to do something like: if...
2
2798
by: William | last post by:
I am attempting to write an XmlDocument to file, but for some reason it will only write 2048 characters of the document even though when I stop it in the debugger ALL of the document is there. ...
0
7130
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,...
0
7007
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...
0
7171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6893
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
4599
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
3098
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...
0
1427
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 ...
0
295
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...

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.