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

How to show sum total of specific field description in a text box in form

1
Suppose I have a table of three fields ID; Seller Name & Daily Sale in Rupees.

There are many entries in a day. At the end of the week I want to see sum total of specific sellers' sales in a TextBox on a Form.
Nov 5 '19 #1
2 1374
ADezii
8,834 Expert 8TB
  1. First, let's make a couple of assumptions:
    1. Table Name: tblSales
    2. Field Names:
      • [ID] - Primary Key {AUTONUMBER/Primary Key}
      • [SName] - Salesperson Name {TEXT}
      • [Sale] - Sale for the Day {CURRENCY} - in US Dollars
    3. Form Name: irrelevant
    4. TextBox Name for Salesperson - [txtName]
    5. Unbound TextBox on Form - txtSales
    6. Current Conversion Rate: 1 US Dollar ==> 61.06 rupees
    7. Control Source of txtSales:
      Expand|Select|Wrap|Line Numbers
      1. =61.06*Nz(DSum("[Sale]","tblSales","[SName]='" & [txtName] & "'"),0) & " rupees"
  2. This will generate the Total Sales in rupees for the Current Salesperson on your Form.
  3. Criteria can be expanded for Date Range, etc.
Nov 5 '19 #2
NeoPa
32,556 Expert Mod 16PB
Hi ADezii.

Were exchanging Rupees for Dollars or vice versa required then I doubt a hard-coded value for the rate would be considered to be adequate going forward. However, I suspect, as all the data is entered, stored and displayed in Rupees, there would be no need for conversion in there.

Obviously this leaves the required solution to be even simpler than you've already posted :-)
Nov 5 '19 #3

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

Similar topics

0
by: matthewemiclea | last post by:
I have a Coninuous form that is based on a table with the following fields: ID (Text) Qty (Number) COMPLETE (Check Box) Users will be going to this form and checking the...
0
by: bienwell | last post by:
Hi, How can we focus on the field after the form validation. For example, user enter wrong data type on the field after validation (RegularExpressionvalidator), and I'd like to focus on that...
9
by: Haas C | last post by:
Hi all! Is there anyway I can override a value in a calculated field on a form? For example: I have a form which displays the following fields based on a query: Premium Due field has the...
3
by: jacklindsay | last post by:
Hello smarter people than me I am creating a database for college, and have requested some help, but they are unable to help me. ( im obviously too eager) anyway, im creating a database on...
5
by: Yohan Blurp | last post by:
Hi, Here is sample page to show you the problem : <html><body> <form action="/cgi-bin/test.cgi" method="post"> Data Path : <input type="text" size="50" value="C:\Test Data\May 2007.xls"...
11
by: radink | last post by:
Hey All, I have a report that I would like to show a word on based on if a field is checked in a form. For example. The form has a check box called Fee. If that is checked, I want the word Paid...
3
by: mckbill | last post by:
Is there a way I can direct the cursor to a specific field (variable) in a form by typing the field name while in form view? I have a form with many fields, and it would be nice if there were...
3
by: Ron Mowry | last post by:
I am wanting to create a macro that will fill a specific field on a form and then go to the next record set. I have a blank field in the table that the form is pulling from. I want the user to be...
6
by: neelsfer | last post by:
I have a combobox in a form that looks up records based on this form itself(cyclist tbl).I also add new records to this same form if i cant find the IDNo of a person in this combobox. If i type in...
7
by: CD Tom | last post by:
I'm using the Calendar (ocxcalendar). I have five calendar fields on my form and I would like to use just one calendar and put an If statement as to what field I'm in. How do I do this? This is...
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: 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...
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...
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.