473,395 Members | 2,222 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,395 software developers and data experts.

How to count a text field in a form

I have two forms. Form-1 has a combo box, the selection from the combo box
populate form-2

Example form-1 Form- 2
Text1 Text2 Text3
Drop down contain text fields NA Sep Jar
NA -- -- ---
sep na
Jars sep
na
jar
Total?
How do i sum the total in form-2, since the selection in the combo box is
defined as a text.

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #1
4 2242
wait... you're trying to do sums on text? They can't even be
represented as numbers like this... if they're numbers stored in text
fields, you can convert them with CInt(txtFieldName) or CSng() etc.

Nov 13 '05 #2
The combox field is defined as a text,I want to count how many times this
fields in the combo was selected. Example, the combox contain fields
selection of A, B, C. I want to get the total count of A, B, and C
whenever it is selected. Thanks

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #3
ja
>The combox field is defined as a text,I want to count how many times this
fields in the combo was selected. ???????? confusing, confusing and confusing. If combox is a field. what is
combo? here is something, if you're trying to get the count of the
values in the combox field, try this:

SELECT Count(*) as valuecount, tablet.combox
FROM tablet
GROUP BY tablet.combox
ORDER BY tablet.combox;
I want to get the total count of A, B, and C
whenever it is selected. see the sql code above.

I hope this helps.
On Thu, 09 Jun 2005 14:38:20 GMT, "Frank O'Neil via AccessMonster.com"
<fo***@AccessMonster.com> wrote:
The combox field is defined as a text,I want to count how many times this
fields in the combo was selected. Example, the combox contain fields
selection of A, B, C. I want to get the total count of A, B, and C
whenever it is selected. Thanks


Nov 13 '05 #4
It does not work. I want the total in form 2 using the selection from
form1. This is the code that i used in the control source of text1, and
text2 in form-2 to get the count from form1 whenever the selection from
the combox that populate form2. Then, I will sum the result of the two
count, however, this does not work.

=DCount("[test1]","sales","[test] = 'A' '" &
[Forms]![Form1]![cboD].(1) & "'")

=DCount("[test1]","sales","[test] = 'B' '" &
[Forms]![Form1]![cboD].(2) & "'")

..
Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Cro | last post by:
Hello Access Developers, I'd like to know if it is possible to perform a count in an expression that defines a control source. My report is based on a query. In my report, I want a text box to...
8
by: Invalidlastname | last post by:
Hi, We are developing an asp.net application, and we dynamically created certain literal controls to represent some read-only text for certain editable controls. However, recently we found an issue...
9
by: Jerry | last post by:
In limiting textbox input to 500 characters I would like to include a dynamic count of characters input while the user is typing into a textbox. This would obviously be a client side control,...
1
by: Jimmy | last post by:
I hate to ask such an ambiguous question but...what are some possible causes of getting #Error in a text box with =Count() as the control source. I have a form with a text control on the form...
2
by: Pete | last post by:
I need to create a single query (Not a SQL query) against a single table that counts the number of records in the table, where the single field "tmp" contains specific string values If the field...
5
by: Dean | last post by:
Hi, I have a table with non-unique identifiers. I need to take all the values with the same ID's and combine them into one field with a semicolon as a seperator. These values may exceed 255...
3
by: Margie | last post by:
Hello all, after getting no where with my Access 2007 database problem for an entire week I figured I could use some outside help. Wanting to skill myself in Access, I decided to make a movie...
3
by: isoquin | last post by:
I've looked, and not found much. I have a text field in a form named , which acquires its data through a control source of =getLocation() the getLocation() function returns a DLookup, which...
14
by: zufie | last post by:
I have to create a QA report regarding callers calling into a phone hotline. The report consists of many checkboxes such as: Did the IBCCP agency contact you? Yes/NO How many days passed...
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: 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
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...
0
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,...

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.