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

Help with formula combining query and table

418 256MB
I have a subform that is based on a query. I want a text box in this form which will give me a calculated figure.

what I want to say is this take the FedRatio from tblGrants and multiply Amount here.

The query is based on tables other than tblGrants. Is it possible to do this?

I know the simple calcualtion should be =[FedRatio] * [Amount] but how do I incorporate FedRatio from tblGrants?

Any help is appreciated. Thanks.
May 7 '09 #1
8 1422
beacon
579 512MB
What is the record source for the subform?

There might be a better way to do this, and of course that depends on what your answer to my question is, but here's what I think you need to do.

If the record source for the subform is tblGrants, add an invisible textbox that has the control source of FedRatio and then use that in your expression.
May 7 '09 #2
MNNovice
418 256MB
The record source for the sub form is a query that's based on several table but NOT the tblGrants. And tblGrant is the one that has the FedRatio.

I am thinking since I need the calculation on a report, I may use tblGrant as one of the source plus the query. Let's see if it works.

Thanks.
May 7 '09 #3
Denburt
1,356 Expert 1GB
Which form are we talking about? Is the main form or the subform based on a query/table that has the GrantID in it? If so then you can add the Grant table in that query and pull the results that you are looking for. You could also use the Dlookup("FedRatio ","tblGrants","GrantID=" & me!cboGrants) However it would be better if you were able to use the first of the two methods since Dlookup can slow things down.
May 7 '09 #4
NeoPa
32,556 Expert Mod 16PB
As Den says M, if there is a logical link between the query data and the particular record you need in tblGrants, then you surely need a query that includes tblGrants as a JOINed table in the FROM clause.

Domain Aggregate (DLookup() etc) functions can be used instead, but as Den so rightly says again, this is not to be advised unless unavoidable.
May 7 '09 #5
MNNovice
418 256MB
Denburt:

Happy Monday!

What I tried to do is to create a report instead. This report is based on a query and a tblGrants. But I get no data - meaning blank page. When I delete tblGrants, it works. But tblGrants is the table which contains the FedRatio that I will need to calculate the amount to charge.

What are my choices to resolve this matter. Thanks.
May 11 '09 #6
Denburt
1,356 Expert 1GB
We are still where we were when I asked about the logical link between the query and tblGrants what tables are in the query? Can you include tblGrants in that query (as Neo suggested)? Then you can create the form or report.

Oh n Happy Monday to you too.
May 11 '09 #7
MNNovice
418 256MB
Denburt:

If you can believe it - somehow it's working now without my doing anything...Go figure.

Oh well, your patience is much appreciated. Until my next question. Thanks again.
May 11 '09 #8
Denburt
1,356 Expert 1GB
That's great that it is working now. Glad we could be of help.
May 11 '09 #9

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

Similar topics

0
by: Phil Powell | last post by:
The table already has a fulltext index and from there I can use the MySQL fulltext search query to get results as well as the relevancy score. The problem I have is that MySQL has a default...
0
by: Mike N. | last post by:
Hello to all: First let me apologize for the length of this question, I've made an attempt to include as much information as is needed to help with the question. I am having problems putting...
4
by: Orion | last post by:
Hi, This is kind of last minute, I have a day and a half left to figure this out. I'm working on a project using ms-sqlserver. We are creating a ticket sales system, as part of the system, I...
1
by: James M via SQLMonster.com | last post by:
Hi, I'm trying to count field login totals for users which updates another field in another table. Which is the most efficient method? I don't want to use a standard query as it will take too...
0
by: Tony Williams | last post by:
I have posted a number of posts in the Access newsgroups concerning my problem with DLookup. I have had a number of the experts with helpful suggestions but I still can't get it to work! This is...
11
by: my-wings | last post by:
I think I've painted myself into a corner, and I'm hoping someone can help me out. I have a table of books (tblBooks), which includes a field (strPubName) for Publisher Name and another field...
1
by: tHeRoBeRtMiTcHeLL | last post by:
Below is an earlier post to an Excel Group.. ....but I thought that there might be a way to do this in Access by importing data and then creating append and/or update query. I would most certainly...
7
by: 663scott | last post by:
Hi I am pretty new to ACCESS. I have created some small databases previously. I need to run a simple query searching for a USERNAME which will gather information from five to ten tables containing...
8
by: Sham | last post by:
I am trying to perform the following query on a table that has been indexed using Full Text Search. The table contains multiple columns than have been indexed. (Below, all xml columns are...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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
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
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.