473,748 Members | 2,470 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using a Query field in a form

I have a query that performs a simple sum, a running total
essentially. I want to be able to use that in a calculation in a form
but I can't seem to get it to display anything beyond #Name?

Structure -

Table A feeds the primary form, recording particulars about a mailing
and calculating costs
Table B feeds a sub-form, line items to track individual expenses in
the mailing

Table B query sums the expenses based on their relationship to the
records in Table A

I want to use that sum in the primary form on a few other
calculations, for example adding it to the total costs of the other
expenses and dividing it by the number of recipients for a mailing to
provide a per-package cost.
Can someone advise me on the best method of doing this? I understand
that this is likely not a new problem or revolutionary, but I am
teaching myself Access and am having trouble determining what exactly
to search for in groups.
Thank you!

Steven

Aug 30 '07 #1
2 1528
On Aug 30, 4:00 pm, sbit...@gmail.c om wrote:
I have a query that performs a simple sum, a running total
essentially. I want to be able to use that in a calculation in a form
but I can't seem to get it to display anything beyond #Name?

Structure -

Table A feeds the primary form, recording particulars about a mailing
and calculating costs
Table B feeds a sub-form, line items to track individual expenses in
the mailing

Table B query sums the expenses based on their relationship to the
records in Table A

I want to use that sum in the primary form on a few other
calculations, for example adding it to the total costs of the other
expenses and dividing it by the number of recipients for a mailing to
provide a per-package cost.

Can someone advise me on the best method of doing this? I understand
that this is likely not a new problem or revolutionary, but I am
teaching myself Access and am having trouble determining what exactly
to search for in groups.

Thank you!

Steven
You haven't included your query, or a detailed description of your
table structure, so the best I can do is recommend that you test the
query out as an actual query first, before assigning it to a screen
control.

Aug 31 '07 #2
On Aug 30, 4:00 pm, sbit...@gmail.c om wrote:
I have a query that performs a simple sum, a running total
essentially. I want to be able to use that in a calculation in a form
but I can't seem to get it to display anything beyond #Name?

Structure -

Table A feeds the primary form, recording particulars about a mailing
and calculating costs
Table B feeds a sub-form, line items to track individual expenses in
the mailing

Table B query sums the expenses based on their relationship to the
records in Table A

I want to use that sum in the primary form on a few other
calculations, for example adding it to the total costs of the other
expenses and dividing it by the number of recipients for a mailing to
provide a per-package cost.

Can someone advise me on the best method of doing this? I understand
that this is likely not a new problem or revolutionary, but I am
teaching myself Access and am having trouble determining what exactly
to search for in groups.

Thank you!

Steven
BTW, since you are new, you may not know that DLOOKUP( ) does the same
thing (a little slower though).

Aug 31 '07 #3

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

Similar topics

3
29021
by: MX1 | last post by:
I have a query written in MS Access that has a few calculated fields. Is it possible to refer to that query in a form field. I'd like the form field to show the sum of one of the columns from the query I've written. I've tried to put the following in the form field's control source property but I'm getting an error. Query1 is the name of the query and CalculatedTotal is the calc'd field column I'm trying to get a total for in the form...
3
4986
by: Steve | last post by:
Form FrmRestock's recordsource is QryFrmRestock. The TransactionDate field's criteria is set ats: Forms!FrmRestock!LastXDays. LastXDays on the form is a combobox where the selections are 30, 60 and 90. The default is set at 30. Question1: When the form opens, there are no records displayed although there are many records that fit the criteria of 30. If I put a button on the form to do a requery and press the button, all the records...
2
4444
by: Marc | last post by:
I'm back in the Access development mode and seem to have forgotten how to do 2 things that should be simple. I have a database with a table of contacts, companies and activities. The idea is that I'll put in a list of companies, a bunch of contacts that work at each company, and an activities form that allows me to input every activity I do for each contact. The activities table includes a lookup field (also named contactID) for...
0
2018
by: Jason | last post by:
I have a primary form which is used to enter/edit data in a table named Test_Results. On this primary form there is a subform which displays site addresses. This subform is linked to the primary form by field named TestID. The subform is used just for displaying site address data, data which is stored in another table named Total_Site_Address. In the Total_Site_Address table there are numerous fields that form the site addresses...
0
1546
by: Jason | last post by:
I would like to be able to place a command button on a primary (parent) form that opens up a subform. I want to use this subform to search for or limit the recordset of data in the primary form. The database is setup as follows: the primary form is named "TestDataCleanup" which is based on a table named "Test_Results". This primary form has multiple subforms associated with it, including "Names_Display" and "SiteAddresses_Display". The...
2
5222
by: Jason | last post by:
I am trying to create a simple database, but it's proving too complex for me!!! I have only just started a new database and am trying to have two fields in a table: the first holding the first name of a person (FirstName) and the second to be the first charactrer of that name. i am using the default value property for the second field of "=Left(,1)", but i am getting error messages when tryign to save it.
4
3828
by: Jimmy | last post by:
I have a form with a command button on it that is supposed to open up a report and use a query to populate it. DoCmd.OpenReport "rptMailingList", acViewPreview, "qryMailingListChristmas" qryMailingListChristmas sql: SELECT DISTINCTROW tblClients.BillingName, tblClients.AccountType, tblClients.BillingAddress, tblClients.Contact, tblClients.BillingCity, tblClients.BillingState, tblClients.BillingZip,
21
34432
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most obvious of which is the sharing of files. For example, you upload images to a server to share them with other people over the Internet. Perl comes ready equipped for uploading files via the CGI.pm module, which has long been a core module and allows users...
1
10500
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am trying to export to Excel using a command in an Access Form. RowID strFY AccountID CostElementWBS 1 2008 1 7 2 2008 1 7 I want to...
221
367602
Atli
by: Atli | last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t. In situations where your PHP application needs to store entire files, the preferred method is to save the file onto the server’s file-system, and store the physical location of the file in your database. This is generally considered to be the easiest and fastest way to store files. ...
0
9376
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9329
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9250
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...
0
8247
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
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
4607
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
3315
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
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
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.