Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

auto calculation in subform

Status
Not open for further replies.

wshs

Programmer
Nov 22, 2005
220
US
i have a subform. source=qry1 lets say.
im trying to update/calculate balance as users
type in the other field but it's not working for some reason.
here is what i have

fields are: Budget, EncAmt, EncPaid, EncBal, TBal.

i've tried doing (in qry criteria)
"EncBal"
=tbl_projectbudget.[encamt]-tbl_projectbudget.[encpaid]

no luck here... any suggestions?
 
The fields you suggest are from where: the main form or subform? What expression did you enter where?
"EncBal" =...
Doesn't tell us anything about where this is coming from.

You might have better luck if you tell us exactly what you have in terms of form and control names as well as fields in your forms.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
subform. and i was talking about criterion of EncBal on query.
 
"EncBal" is a text value not a field name.

Maybe someone else can understand what you have and what you want but it isn't clear to me.

Do you realize you can't use a table name in a query where the table is not in the query?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
let me try to explain clearly.

the query is based on two tables.
tbl_projectMain
-pkeyProjectID,projname,projamt
tbl_projectBudget
- pkeybudID,fkeyprojectid,budname,budamt,encamt, encpaid, encbal,pbbal.

Form frm_projectBud has 3 fields.
- projid, projname, projamt,
also has subform (source:qry_projDetails)
-pkeybudID,fkeyprojectid,budname, etc

on that form, i just want encbal and pbbal to be calculated automatically based on what user types in other fields.

query contains both tables.
 
This is just getting more confusing. I don't know what is meant by "based on what user types in other fields".

Maybe if you took the time to type a few sample records or something.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top