Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / July 2007

Tip: Looking for answers? Try searching our database.

If statement with checkbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TraderAnalysis - 16 Jul 2007 15:14 GMT
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.
KARL DEWEY - 16 Jul 2007 15:40 GMT
The easiest way is to do the calculation in the query used as source for the
form instead of in the form.

Signature

KARL DEWEY
Build a little - Test a little

> 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.  
[quoted text clipped - 10 lines]
>
> Thanks for your help.  
TraderAnalysis - 16 Jul 2007 15:46 GMT
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?  

> The easiest way is to do the calculation in the query used as source for the
> form instead of in the form.
[quoted text clipped - 13 lines]
> >
> > Thanks for your help.  
Jason Lopez - 16 Jul 2007 15:54 GMT
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
> That's exactly what I did but won't the query have to rerun in order to
> get
[quoted text clipped - 28 lines]
>> >
>> > Thanks for your help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.