If statement with checkbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I feel I have a fairly simple form but I'm having a few issues. I am
establishing a form which will allow for 2008 PnL and Volume projections.
For each trader, I have current PnL and another box for a projected % rate
increase/decrease. I then have a format that multiples the 2. It works for
the first record in database but when I go to the next record, it shows the
same #, and the next record and so on. How can I fix it?

Also, I would like to have in the footer an if statement that says that if
they check the "included" box on the top of the page for that trader that it
will continously sum the PnL and volume for the office. I currently have a
subform that multiples the projections but I want to know how I can only
include the projections for those with the checkbox?

Thanks for your help.
 
The easiest way is to do the calculation in the query used as source for the
form instead of in the form.
 
That's exactly what I did but won't the query have to rerun in order to get
an accurate number in the form? How can I get it so that when the checkbox
is clicked that it automatically updates the footer on the form?
 
You can either create an AfterUpdate event macro so that it performs the
requery or add in some code like this:

Function Macro1()
On Error GoTo Macro1_Err

DoCmd.Requery "BFT"
DoCmd.GoToControl "BFT"


Macro1_Exit:
Exit Function

Macro1_Err:
MsgBox Error$
Resume Macro1_Exit

End Function

I just created a macro and then converted it to VB. This will allow that
when the data in the check box changes, so to can the footer information.

Jason Lopez
 

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