G
Guest
Good day
I'm wondering if you can identify a function or command in the following code that doesn't execute properly if an .mdb is developed in Access 2002, but then run from within Access 2000? Can you offer a solution
The subsequent code is executed as an Afterupdate event for a combo box when a value (product) is chosen from the list. The code executes properly in Access 2002 but causes the following error dialog in Access 2000
run-time error -2147352567 (80020009) The value entered isn't valid for this field
Private Sub ProductID_AfterUpdate(
Dim strWhere As Strin
If Not (IsNull(Me.ProductID) Or IsNull(Me.Parent.CustomerID)) The
strWhere = "(ProductID = " & Me.ProductID &
") AND (CustomerID = " & Me.Parent.CustomerID & ")
Me.UnitPrice = DLookup("UnitPrice", "tblCustPrice", strWhere
Me.UnitP = DLookup("Unit", "tblCustPrice", strWhere
Me.USP = DLookup("US", "tblCustPrice", strWhere
End I
If Not (IsNull(Me.ProductID) Or IsNull(Me.Parent.SupplierID)) The
strWhere = "(ProductID = " & Me.ProductID &
") AND (SupplierID = " & Me.Parent.SupplierID & ")
Me.UnitCost = DLookup("UnitCost", "tblSuppCost", strWhere
Me.UnitC = DLookup("Unit", "tblSuppCost", strWhere
Me.USC = DLookup("US", "tblSuppCost", strWhere
End I
End Su
Cheers
Jod
I'm wondering if you can identify a function or command in the following code that doesn't execute properly if an .mdb is developed in Access 2002, but then run from within Access 2000? Can you offer a solution
The subsequent code is executed as an Afterupdate event for a combo box when a value (product) is chosen from the list. The code executes properly in Access 2002 but causes the following error dialog in Access 2000
run-time error -2147352567 (80020009) The value entered isn't valid for this field
Private Sub ProductID_AfterUpdate(
Dim strWhere As Strin
If Not (IsNull(Me.ProductID) Or IsNull(Me.Parent.CustomerID)) The
strWhere = "(ProductID = " & Me.ProductID &
") AND (CustomerID = " & Me.Parent.CustomerID & ")
Me.UnitPrice = DLookup("UnitPrice", "tblCustPrice", strWhere
Me.UnitP = DLookup("Unit", "tblCustPrice", strWhere
Me.USP = DLookup("US", "tblCustPrice", strWhere
End I
If Not (IsNull(Me.ProductID) Or IsNull(Me.Parent.SupplierID)) The
strWhere = "(ProductID = " & Me.ProductID &
") AND (SupplierID = " & Me.Parent.SupplierID & ")
Me.UnitCost = DLookup("UnitCost", "tblSuppCost", strWhere
Me.UnitC = DLookup("Unit", "tblSuppCost", strWhere
Me.USC = DLookup("US", "tblSuppCost", strWhere
End I
End Su
Cheers
Jod