Display query result in a Control on a Form

  • Thread starter Thread starter curniac
  • Start date Start date
C

curniac

Ok, let me try and explain this.

I have a table that keeps cost and payment information in different
fields.
fTotalCost, fPayment1, fPayment2, fPayment3. I have built a query to
get the Balance - obvioulsy the query subtracts the payments from the
total cost. The result of the query is an experssion value. How do I
get this to show in a text field control on my Access form?

The form is based off of a table and not the query. The query only does
the calulation.

Can anyone help?
 
Ok, let me try and explain this.

I have a table that keeps cost and payment information in different
fields.

Then you have an incorrectly designed table.
fTotalCost, fPayment1, fPayment2, fPayment3. I have built a query to
get the Balance - obvioulsy the query subtracts the payments from the
total cost. The result of the query is an experssion value. How do I
get this to show in a text field control on my Access form?

The form is based off of a table and not the query. The query only does
the calulation.

Can anyone help?

Rather than storing each payment in a different *field*, you should be
storing each payment in a different *record*. You have a one
(purchase) to many (payments) relationship - you need to model it as a
one to many relationship!

With correct table structure, a very simple Totals query will
calculate your balance.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top