Hi Team,
Thank you for all your help.
Just to let you know I have now got the solution:
In the After Update Event I have placed the following code:
Private Sub AccountType_AfterUpdate()
Me.OrdersSubform.Form.UnitPrice.ColumnHidden = True
Me.OrdersSubform.Form.TradePrice.ColumnHidden = True
Me.OrdersSubform.Form.DIYPrice.ColumnHidden = True
Select Case Me.AccountType
Case "Account"
Me.OrdersSubform.Form.UnitPrice.ColumnHidden = False
Case "Trade"
Me.OrdersSubform.Form.TradePrice.ColumnHidden = False
Case "DIY"
Me.OrdersSubform.Form.DIYPrice.ColumnHidden = False
End Select
End Sub
IT WORKS!!!!!
The only issue I have now is working out my line total in my subform but this will be my next question as the code I am using now in a query is this:
SELECT DISTINCTROW [Order Details].OrderID, [Order Details].ProductID, Products.ProductName, Products.UnitPrice, Products.TradePrice, Products.DIYPrice, [Order Details].Quantity, [Order Details].Discount, CCur(Products.UnitPrice*[Quantity]*(1-[Discount])/100)*100 AS ExtendedPrice
FROM Products INNER JOIN [Order Details] ON Products.ProductID = [Order Details].ProductID
ORDER BY [Order Details].OrderID;
As you can see it is picking up the UnitPrice, but of course this changes depending on what fields are displayed from the combo box.
Any takers?
Cheers
James.