Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 13th, 2005, 11:04 AM
GoogleGroups@FatBelly.com
Guest
 
Posts: n/a
Default How To Compute "Residual" On Form?

"Residual" is the diff between returns of two funds.

I've got a form.

The form will have two and only two records on it: one for Fund#1 and
the other for Fund#2. Each record contains FundName and FundReturn.

At the bottom of the form, I need to show the diff between Fund#1's
return and Fund#2's return.


With a report, no problem: just define a couple invisible fields with
..RunningSum=Overall, populate them with IIF statements depending on
Fund#, and then compute a diff in ReportFooter.


But there's no RunningSum on a form.


Suggestions?

  #2  
Old November 13th, 2005, 11:04 AM
Beacher
Guest
 
Posts: n/a
Default Re: How To Compute "Residual" On Form?

how are they displayed? in text boxes? you could do it in vba

  #3  
Old November 13th, 2005, 11:04 AM
PeteCresswell
Guest
 
Posts: n/a
Default Re: How To Compute "Residual" On Form?

Text boxes.

What event(s) would I use?

  #4  
Old November 13th, 2005, 11:04 AM
Beacher
Guest
 
Posts: n/a
Default Re: How To Compute "Residual" On Form?

It sounds too simple to me, so I might be missing something, but
couldnt you just have
label = me.txtfield1.value - me.txtfield2.value in vba code?

  #5  
Old November 13th, 2005, 11:04 AM
PeteCresswell
Guest
 
Posts: n/a
Default Re: How To Compute "Residual" On Form?

> label = me.txtfield1.value - me.txtfield2.value in vba code?

Doesn't work. Refers to values in current record only. In a
report, this can be gotten around by assigning property
..RunningSum=Overall to txtField1 and txtField2. Then it works.

Doesn't work on a Form bc there's no .RunningSum property.

I was trying to stay with the .RecordSet/Continuous form paradigm.

Sounds like it's time to bite the bullet and just set up a grid with a
field for each discreet value (i.e. txtFund1Name, txtFund2name,
txtFund1Value, txtFund2Value...and so-forth) and then just open up a
RecordSet in Form_Open, boogie through the two records, and explicitly
populate each field in the grid.

  #6  
Old November 13th, 2005, 11:04 AM
Beacher
Guest
 
Posts: n/a
Default Re: How To Compute "Residual" On Form?

Sorry I couldn't be of more help :(

  #7  
Old November 13th, 2005, 11:04 AM
PeteCresswell
Guest
 
Posts: n/a
Default Re: How To Compute "Residual" On Form?

Thanks for the thought though....

Upon reflection, I think the grid of individual fields is the way to go
anyhow. The users want to be able export the contents of the screen
to an MS Excel spreadsheet - and a grid of individual fields will make
that coding more straightforward - i.e. no recordsets/processing loops
needed.... just go right to the Form object and pick off the fields....

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles