conditional form calculations

E

Ed

I'm modifying the sample Northwind database. On the Orders form, I need to
have freight charges determined by the Shipper selection. I've tried using
an If Else statement in the code for the on_Focus event, but it doesn't
update. Any suggestions?
 
T

Tom van Stiphout

On Sat, 24 Jan 2009 18:41:01 -0800, Ed <[email protected]>
wrote:

Is the freight charge a fixed amount that varies by shipper, or is
there a more complicated formula?

-Tom.
Microsoft Access MVP
 
E

Ed

I have shippers set up as UPS and Pickup. If UPS is selected, the Freight
should be 10% of the subtotal. If it is Pickup, the Freight should be 0.00.
 
T

Tom van Stiphout

I am assuming Shippers is a dropdown. In its AfterUpdate event write:
select case Me.myShippersDropdown
case "UPS"
Me.myFreight = Me.mySubtotal * 0.1
case "Pickup"
Me.myFreight = 0
case Else
Debug.Assert "Unknown Shipper"
end select
(of course you replace myObjectNames with yours)

-Tom.
Microsoft Access MVP
 
M

Mark Han[MSFT]

Hi Ed,

Thank you for using Microsoft MSDN Managed Newsgroup. My name is Mark Han.
I am glad to work with you on this issue.

After reviewing the reponse to you, I found Tom have given a good exmaple.
Thank you Tom. If your concern is not addressed, please email me. My email
is (e-mail address removed)(remove online). in order to better assist
you, I would like to re-produce the issue.

If there is anything unclear, please let me know.

Have a nice day!

Best regards,
Mark Han
Microsoft Online Community Support
===========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: (e-mail address removed).
===========================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or
a Microsoft Support Engineer within 2 business day is acceptable. Please
note that each follow up response may take approximately
2 business days as the support professional working with you may need
further investigation to reach the most efficient resolution.
The offering is not appropriate for situations that require urgent,
real-time or phone-based interactions. Issues of this nature are
best handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx

============================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
 
M

Mark Han[MSFT]

Hi Ed,

I'm Mark Han. I'm writing to follow up the post.

If I can assis you anthing related to the issue, please let me know.

I look forward to your update. Thanks.

Best regards,
Mark Han
Microsoft Online Community Support
=========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: (e-mail address removed).
=========================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
 

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