S
slim
Further to my problem with updating price field, I've
changed the code to read as follows and it comes up with
the error 3326 message. What is wrong with it? Can anyone
help? Please!!! I'm a novice at this.
Private Sub CurrentPrice_Enter()
Dim mydb As Database
Dim productSet As Recordset
Dim ProductNumber As Integer
Dim UnitCost As Double
Set mydb = CurrentDb()
Set productSet = mydb.OpenRecordset("tblProducts")
ProductNumber = [Form_frmCustomersOrderDetails
subform].ProdID.Value
productSet.Index = "PrimaryKey"
productSet.Seek "=", ProductNumber
UnitCost = productSet!UnitPrice
[Form_frmCustomersOrderDetails subform].CurrentPrice.Value
= UnitCost
productSet.Close
End Sub
changed the code to read as follows and it comes up with
the error 3326 message. What is wrong with it? Can anyone
help? Please!!! I'm a novice at this.
Private Sub CurrentPrice_Enter()
Dim mydb As Database
Dim productSet As Recordset
Dim ProductNumber As Integer
Dim UnitCost As Double
Set mydb = CurrentDb()
Set productSet = mydb.OpenRecordset("tblProducts")
ProductNumber = [Form_frmCustomersOrderDetails
subform].ProdID.Value
productSet.Index = "PrimaryKey"
productSet.Seek "=", ProductNumber
UnitCost = productSet!UnitPrice
[Form_frmCustomersOrderDetails subform].CurrentPrice.Value
= UnitCost
productSet.Close
End Sub