Field Linked to Queries

JIT

Registered User.
Local time
Today, 06:05
Joined
Sep 11, 2002
Messages
29
Hello Everybody,

This may look simple to many of you. However, my thing is not working. I have a form, which is linked to a Query. But, one specifice field of the form is linked to an another query. For that specific field, in property, control source, I have put following expression: [Queries]![Name of the specifice query].[Name of the specifice field]. Is my expression not correct? Or, I cannot link any specifice field to an another Query?

I always appreciate, how much help, I have received from this forum.

Thanks in advance,

Jit
 
I'm no expert.....but here's my 2 cents.

Instead of trying to just stick it on the form, why not add ALL fields to the query. You can make queries based on tables or based on other queries.
 
Clarification

Thanks Kbrooks for your suggestion! I think, I have not made my thoughts clear.
I have a complaint database, consisting of two tables, CustomerInformation and ComplaintRegistration, and having one to many relationship, (CustomerID primary key). When I receive complaint I enter through ComplaintRegistration form. I have added a subform in ComplaintRegistration form, where I can view all complaints received against particular customer, while entering complaint against that customer. The ComplaintRegistration form is sourced via a Query. The subform is also sourced via an another Query. Up to this, things work well. I want to add another text box, in subform, which will total amount of credit memo issued to the customer for complaint/rejected material. I have made a Query with CustomerName and a calculated field(Sum expression), grouped by customer. When I run this query, it shows amount of credit memo issued against individual customer. I want to add this query to the text box in the subform. I do not know how to do it. I would appreciate any help/input in this regard.

Thanks in advance!

Jit
 
Sounds like you are half way there.

In your query (that returns the sum expression) I would recommend including the Customer primary key (to avoid two customers with same name)

You could then use the DLOOKUP function to return your query value.

eg:

=dlookup("SumExpressionName","QueryName","CustomerID = " & CustomerID)

Obviously replace the above with correct field and query names etc.

HTH

Brad.
 
Thanks Brad!

I have added the expression. It is now working perfectly.

Once again thank you very much. As I say always, this forum is very helpful to a novice like me.

Jit
 

Users who are viewing this thread

Back
Top Bottom