473,386 Members | 1,860 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,386 software developers and data experts.

Very Basic

8
I have done this many times before but must be missing something. I am just trying to gather number data from an existing query or table that shows up in a text field. I keep getting syntax errors. ??

I am also looking for a reference book that has many examples of calculated controls and expressions. This would be for form use.
Jun 26 '08 #1
3 1236
NeoPa
32,556 Expert Mod 16PB
I'm sorry, but you provide too little information to work with.
Jun 27 '08 #2
rnash1
8
I'm sorry, but you provide too little information to work with.
As usual I thought about it after I sent it. I agree not enough info. I'm trying to creat a text field that will show the exact # of records in a table thats already created. The I.D. #s are out of order and out of sequence so I added a new colunm called quantity and manulally #s in seguence but for some reason this just wont work. If I creat a new database this works, but not in the current one used. Sum=([quantity]) This is so simple, I cant figure out whats happening with this.
Jun 30 '08 #3
Stewart Ross
2,545 Expert Mod 2GB
Hi. If you want to count the number of records use the Count function to do so. It is more useful to group the records together (by Dept, for example) so that the count is not just a single count of all the records but a meaningful count of the number within that specific grouping:

Expand|Select|Wrap|Line Numbers
  1. SELECT Dept, Count(*) as RecCount from Sometable GROUP BY Dept;
If you want to sum a field, as in your example, the approach is similar:

Expand|Select|Wrap|Line Numbers
  1. SELECT Dept, Sum([Quantity]) as NumberSold, Count(*) as RecCount from Sometable GROUP BY Dept;
On a related but different application which does not involve SQL, if you wanted to have an unbound control on a form or a report do the sum of a field called Quantity (assumed to be a part of the underlying table or query) you would set the control's control source property to
Expand|Select|Wrap|Line Numbers
  1. =Sum([Quantity])
I wonder if it is mixing these two syntaxes up which is causing at least part of your difficulties?

-Stewart
Jul 1 '08 #4

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

Similar topics

42
by: Steven O. | last post by:
I am seeking some kind of tool that I can use for GUI prototyping. I know how to use Visual Basic, but since a lot of software is being coded in Java or C++, I'd like to learn a Java or C++ -based...
30
by: Vla | last post by:
why did the designers of c++ think it would be more useful than it turned out to be?
5
by: Lee David | last post by:
I went to the sun site and downloaded what I hope is the development part of java. I downloaded JDK5 with Netbeans. I installed it and now have a folder in my program group "Netbeans". Is that...
10
by: Jason Curl | last post by:
Greetings, I have an array of 32 values. This makes it extremely fast to access elements in this array based on an index provided by a separate enum. This array is defined of type "unsigned long...
0
by: Andy | last post by:
Hey All, I'm a beginner with VB.Dotnet Deployment and I'm a little confused about some very basic deployment issues . . . I've now created some core assemblies that will be used throughout all...
8
by: pamelafluente | last post by:
Hi, I would like to get some advice. I know enough vb.net on win apps, but I have never worked on web applications and asp.net. I would appreciate if you could indicate the most basic...
4
by: Mason Barge | last post by:
I'm learning how to build a website. So far I've gotten pretty good with HTML, CSS, and Paint Shop Pro, and I'm currenly learning the basics of Javascript. I'm hoping, eventually, to build and...
17
by: blueapricot416 | last post by:
This is a very basic question -- but I can't find the answer after looking for 20 minutes. If you code something like: function set_It() { setTimeout('Request_Complete("apple", -72)',5000) }...
7
by: Bruno43 | last post by:
Hi I am trying to learn Visual Basic and I am getting everything for the most part, mainly because of my ability to read code like a book, but my question is what is the best way to Navigate through...
3
by: bbatson | last post by:
New to visual basic; trying to teach myself. Here is very basic code I am using to try to fill a text box on my form after updating a box that selects an employee ID. Dim strsql As String strsql...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
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
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
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...

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.