web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

VBA Freight Tax

(0) ShareShare
ReportReport
Posted on by

We have an issue on when to assess tax on freight. We have 2 types of customers, our corp owned and franchisees. All customers are in every US states. We just want to assess freight tax on our franchisees. Currently the setting is nontaxable on freight.

My solution is to create a VBA on the sales order entry window. Once lose focus on the freight field, the VBA will update the non-taxable to based on customer freight taxable option if it's a franchisee.  I'm stuck on the technical names of the fields, so can anyone help with the object names for the sales tax detail window and the freight taxable drop down list? Or if there's a written code that i could use, that would be awesome!

Thanks in advance

Hung

*This post is locked for comments

  • Community Member Profile Picture
    on at

    I think i'm close. I created a macro to run when the freight field lose focus. The macros opens the sales tax schedule window, change the freight taxable from "non-taxable" to "'based on customer", click ok, then click recalculates when asked "this change will affect the current tax calculation".

    It works but the one hiccup is when the user makes a change on the freight again. I get this error message, "No modal dialog appeared. (Line #8)" . Any ideas on how to bypass this error message?

    Here's my code, be gentle I'm not a programmer.

    Private Sub Freight_AfterUserChanged()

    If (CInt(CustomerID) > 2000 And CInt(CustomerID) < 9999) Then

    'run frt taxable macro

    SendKeys "+{F1}"

     Else

     End If

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans