Hi all,
I have a subform where I select the transaction to be imported into the main form
After import, I need to run the below command
This unfortunately does not work as for some reason it is giving me an error down the function coding of the exchange rate lookup
If I create a button on the main form with the below code, it works just fine
Please could you guide me in the different direction.
The complete code when I run the code is below
I have a subform where I select the transaction to be imported into the main form
After import, I need to run the below command
Me.Parent!txtExchange = ToUGX(Me.Parent!txtDate, Me.Parent!Currency)
This unfortunately does not work as for some reason it is giving me an error down the function coding of the exchange rate lookup
If I create a button on the main form with the below code, it works just fine
Me.txtExchange = ToUGX(Me.txtDate, Me.Currency)
Please could you guide me in the different direction.
The complete code when I run the code is below
Private Sub Select_AfterUpdate()
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenQuery "Clear Transactions - Procurement - Temp", acViewNormal, acEdit
DoCmd.OpenQuery "Clear Transactions - Procurement - Temp - Header", acViewNormal, acEdit
DoCmd.OpenQuery "Update Transactions - Procurement Temp from Procurement - Header"
DoCmd.OpenQuery "Update Transactions - Procurement Temp from Procurement - Detail"
DoCmd.Close
DoCmd.OpenForm "PurchaseOrder_Order"
Me.Parent!txtExchange = ToUGX(Me.Parent!txtDate, Me.Parent!Currency)
DoCmd.OpenQuery "Update Transactions - Procurement - Temp - Last Purchase Price"
Forms![PurchaseOrder_Order].Form.Requery
Forms![PurchaseOrder_Order]![PurchaseOrderOrderSubForm].Form.Requery
End Sub