Calculations not processing

S

Sandy

Hello -

I have a DLookup that only calculates when I view the form in design mode,
then go back to form mode.

This database is built and saved in Access 2003 and is being viewed by some
users via Access 2007. The issue is only with the Access 2007 users.

Any help greatly appreciated.

many thanks
sandra
 
J

Jeff Boyce

How are you telling Access to do the re-calculation?

Are the fields involved bound or unbound.

Is the form bound or unbound?

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
S

Sandy

Hello Jeff -

The form is bound to t_accounting and has several unbound fields to process
the calculations.

The DLookup calculation is in field named AmtCalc, which is unbound

Combo52 is a dropdown with control source of ChCrID, which is a bound field
to t_accounting - this selects the type of discount to be applied by
specifying the ChCrID to use in the DLookup

The event on Combo52 is On Change, and directs the focus to the AmtCalc field

The formula in the AmtCalc is as follows:

=(DLookUp(" [ChCrAmt]","t_ChargesCredits","[ChCr_ID]= " &
[ChCrID]))+(DLookUp(" [CourseFee]","t_Courses","[Course_ID]= " &
[CourseID]))*(DLookUp(" [ChCrperc]","t_ChargesCredits","[ChCr_ID]= " &
[ChCrID]))*-1

The OnFocus event for AmtCalc is to SetValue of Amt (which is bound to
t_accounting table) equal to the calculated amount in AmtCalc

On this form, the events are all Macros.

I notice that in the macro window, some lines have a yellow triangle icon
saying "This action will not be allowed if the dabase is not trusted"

In the Trust Centre, my trusted location is
C:\Program Files\Microsoft Office\Office12\ACCWIZ\

All macros are enabled.

Thanks for your help!

sandra
 
S

Sandy

Just to clarify, the calculations all compute when I go from form to design
and back to form view.



Sandy said:
Hello Jeff -

The form is bound to t_accounting and has several unbound fields to process
the calculations.

The DLookup calculation is in field named AmtCalc, which is unbound

Combo52 is a dropdown with control source of ChCrID, which is a bound field
to t_accounting - this selects the type of discount to be applied by
specifying the ChCrID to use in the DLookup

The event on Combo52 is On Change, and directs the focus to the AmtCalc field

The formula in the AmtCalc is as follows:

=(DLookUp(" [ChCrAmt]","t_ChargesCredits","[ChCr_ID]= " &
[ChCrID]))+(DLookUp(" [CourseFee]","t_Courses","[Course_ID]= " &
[CourseID]))*(DLookUp(" [ChCrperc]","t_ChargesCredits","[ChCr_ID]= " &
[ChCrID]))*-1

The OnFocus event for AmtCalc is to SetValue of Amt (which is bound to
t_accounting table) equal to the calculated amount in AmtCalc

On this form, the events are all Macros.

I notice that in the macro window, some lines have a yellow triangle icon
saying "This action will not be allowed if the dabase is not trusted"

In the Trust Centre, my trusted location is
C:\Program Files\Microsoft Office\Office12\ACCWIZ\

All macros are enabled.

Thanks for your help!

sandra



Jeff Boyce said:
How are you telling Access to do the re-calculation?

Are the fields involved bound or unbound.

Is the form bound or unbound?

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

Jeff Boyce

So, if that path that is trusted is NOT the location of the file you are
working on, Access won't trust the macros!

If you haven't done so already, open the Trust Center and add the location
(file path) where this particular Access application/db/file is located.

JOPO (just one person's opinion) -- I've created a folder under my C:\ that
holds ALL of my Access applications, then marked that folder ("+ all
subfolders") as trusted.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

Sandy said:
Hello Jeff -

The form is bound to t_accounting and has several unbound fields to
process
the calculations.

The DLookup calculation is in field named AmtCalc, which is unbound

Combo52 is a dropdown with control source of ChCrID, which is a bound
field
to t_accounting - this selects the type of discount to be applied by
specifying the ChCrID to use in the DLookup

The event on Combo52 is On Change, and directs the focus to the AmtCalc
field

The formula in the AmtCalc is as follows:

=(DLookUp(" [ChCrAmt]","t_ChargesCredits","[ChCr_ID]= " &
[ChCrID]))+(DLookUp(" [CourseFee]","t_Courses","[Course_ID]= " &
[CourseID]))*(DLookUp(" [ChCrperc]","t_ChargesCredits","[ChCr_ID]= " &
[ChCrID]))*-1

The OnFocus event for AmtCalc is to SetValue of Amt (which is bound to
t_accounting table) equal to the calculated amount in AmtCalc

On this form, the events are all Macros.

I notice that in the macro window, some lines have a yellow triangle icon
saying "This action will not be allowed if the dabase is not trusted"

In the Trust Centre, my trusted location is
C:\Program Files\Microsoft Office\Office12\ACCWIZ\

All macros are enabled.

Thanks for your help!

sandra



Jeff Boyce said:
How are you telling Access to do the re-calculation?

Are the fields involved bound or unbound.

Is the form bound or unbound?

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
S

Sandy

HI Jeff -

I added the folder to the the trusted locations but still no go on the issue.

I resolved the issue by adding a Run Command -> Refresh line to the macro.
I also asked the client to add the database location to the Trusted
Locations.

Thanks for your help, as always!
sandra



Jeff Boyce said:
So, if that path that is trusted is NOT the location of the file you are
working on, Access won't trust the macros!

If you haven't done so already, open the Trust Center and add the location
(file path) where this particular Access application/db/file is located.

JOPO (just one person's opinion) -- I've created a folder under my C:\ that
holds ALL of my Access applications, then marked that folder ("+ all
subfolders") as trusted.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

Sandy said:
Hello Jeff -

The form is bound to t_accounting and has several unbound fields to
process
the calculations.

The DLookup calculation is in field named AmtCalc, which is unbound

Combo52 is a dropdown with control source of ChCrID, which is a bound
field
to t_accounting - this selects the type of discount to be applied by
specifying the ChCrID to use in the DLookup

The event on Combo52 is On Change, and directs the focus to the AmtCalc
field

The formula in the AmtCalc is as follows:

=(DLookUp(" [ChCrAmt]","t_ChargesCredits","[ChCr_ID]= " &
[ChCrID]))+(DLookUp(" [CourseFee]","t_Courses","[Course_ID]= " &
[CourseID]))*(DLookUp(" [ChCrperc]","t_ChargesCredits","[ChCr_ID]= " &
[ChCrID]))*-1

The OnFocus event for AmtCalc is to SetValue of Amt (which is bound to
t_accounting table) equal to the calculated amount in AmtCalc

On this form, the events are all Macros.

I notice that in the macro window, some lines have a yellow triangle icon
saying "This action will not be allowed if the dabase is not trusted"

In the Trust Centre, my trusted location is
C:\Program Files\Microsoft Office\Office12\ACCWIZ\

All macros are enabled.

Thanks for your help!

sandra



Jeff Boyce said:
How are you telling Access to do the re-calculation?

Are the fields involved bound or unbound.

Is the form bound or unbound?

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP

Hello -

I have a DLookup that only calculates when I view the form in design
mode,
then go back to form mode.

This database is built and saved in Access 2003 and is being viewed by
some
users via Access 2007. The issue is only with the Access 2007 users.

Any help greatly appreciated.

many thanks
sandra
 
J

Jeff Boyce

Thanks for posting your solution. Someone, sometime, will be looking for
this answer and find yours!

Regards

Jeff Boyce
Microsoft Office/Access MVP

Sandy said:
HI Jeff -

I added the folder to the the trusted locations but still no go on the
issue.

I resolved the issue by adding a Run Command -> Refresh line to the macro.
I also asked the client to add the database location to the Trusted
Locations.

Thanks for your help, as always!
sandra



Jeff Boyce said:
So, if that path that is trusted is NOT the location of the file you are
working on, Access won't trust the macros!

If you haven't done so already, open the Trust Center and add the
location
(file path) where this particular Access application/db/file is located.

JOPO (just one person's opinion) -- I've created a folder under my C:\
that
holds ALL of my Access applications, then marked that folder ("+ all
subfolders") as trusted.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

Sandy said:
Hello Jeff -

The form is bound to t_accounting and has several unbound fields to
process
the calculations.

The DLookup calculation is in field named AmtCalc, which is unbound

Combo52 is a dropdown with control source of ChCrID, which is a bound
field
to t_accounting - this selects the type of discount to be applied by
specifying the ChCrID to use in the DLookup

The event on Combo52 is On Change, and directs the focus to the AmtCalc
field

The formula in the AmtCalc is as follows:

=(DLookUp(" [ChCrAmt]","t_ChargesCredits","[ChCr_ID]= " &
[ChCrID]))+(DLookUp(" [CourseFee]","t_Courses","[Course_ID]= " &
[CourseID]))*(DLookUp(" [ChCrperc]","t_ChargesCredits","[ChCr_ID]= " &
[ChCrID]))*-1

The OnFocus event for AmtCalc is to SetValue of Amt (which is bound to
t_accounting table) equal to the calculated amount in AmtCalc

On this form, the events are all Macros.

I notice that in the macro window, some lines have a yellow triangle
icon
saying "This action will not be allowed if the dabase is not trusted"

In the Trust Centre, my trusted location is
C:\Program Files\Microsoft Office\Office12\ACCWIZ\

All macros are enabled.

Thanks for your help!

sandra



:

How are you telling Access to do the re-calculation?

Are the fields involved bound or unbound.

Is the form bound or unbound?

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP

Hello -

I have a DLookup that only calculates when I view the form in design
mode,
then go back to form mode.

This database is built and saved in Access 2003 and is being viewed
by
some
users via Access 2007. The issue is only with the Access 2007 users.

Any help greatly appreciated.

many thanks
sandra
 

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

Top