Hello! I need some help troubleshooting a VBA customization that we use for pricing on the Sales Transaction Entry screen. GP Pricing doesn't work for us so we have a VBA form that allows a user to select a price, and that price is applied to the line item in VBA with UnitPrice.Focus (price). This works great we have no problems.
Sometimes the users need to review and/or change pricing after the order was already entered. So I added a button to the header on Sales Transaction Entry that will open the same VBA window and allow the user to select the price, using the same UnitPrice.Focus command. This works great until an item is on backorder. In this case it causes GP to crash with a ntdll error, which corrupts the Sales Order the user was working on. This is absolutely driving us crazy!
Is there another VBA command that should be used to set pricing on the current line in the SalesTransactionEntryDetail form from the SalesTransactionEntry form?
Here is my code:
SalesTransactionEntry:
Private Sub ItemPricing_Changed()
Dim ssellprice As String
ssellprice = SalesTransactionEntryDetail.DisplaySalesQuote(Trim(CustomerID.Value), Trim(SalesTransactionEntryDetail.ItemNumber.Value))
End Sub
SalesTransactionEntryDetail:
Public Function DisplaySalesQuote(ByVal CustomerID As String, ByVal ItemNumber As String) As String
Dim ssellprice As String
Load frmPriceQuote 'Custom VBA Form to Allow User to Select Price
frmPriceQuote.lblCustomerID.Tag = CustomerID
frmPriceQuote.lblItemNumber.Tag = ItemNumber
frmPriceQuote.Show 1
ssellprice = frmPriceQuote.gsSellPrice
If ssellprice <> "" Then
UnitPrice.Focus CSng(ssellprice)
End If
End Function
Thanks in advance for any ideas you might have! I have completely run out of them.
John
*This post is locked for comments