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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter appears twice when I refresh data on a form?

Status
Not open for further replies.

winston01

Programmer
May 31, 2005
37
US
Thank you for reading!

I have a form that calcualtes running totals. The subform looks at a query (qryinvoicesandbalances) with a parameter searching for FundID. I am using the following code on the main form for running totals:

=Forms!schoolchurchpointelementary!qryinvoicesandbalancessubform.Form![Total Withdrawals]
=Forms!schoolchurchpointelementary!qryinvoicesandbalancessubform.Form![Total Deposits]
=nz([Total Deposits])-nz([Total Withdrawals])

These codes work great.
I created a command button on the form to refresh data, when I push it the parameter appears twice.

The form and the refresh button worked great until I added the running totals code. Once I added the code the parameter shows twice. I am assuming the refresh button is running the parameter twice to refresh the code(which looks at a query with a parameter) and the subform (Which looks at the query with a parameter).

Any ideas on what I am doing wrong? I do not want the parameter to show twice. It seems that the second parameter actually pulls the right fundID. I'm not sure what the first parameter box is doing.

I appreciate any help anyone can give me.
 
=nz([Total Deposits])-nz([Total Withdrawals]) ???
See VBA help file how you use NZ function to replace Null to Zero(NZ).


________________________________________
Zameer Abdulla
Visit Me
Minds are like parachutes. They only function when they are open. -Sir James Dewar (1877-1925)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top