Hi
Thanks for your help earlier in the week. All is working perfectly with creating new quotes.
However now got an issue of how to handle the user going back and editing the records. I need to allow the user to edit prices on the form Frm68AQuotes which then propogates through to tblquotelines. Could your code be modified to an Update Query easily?
Also need to handle if they go back and add another new product price. Currently your code would create new records causing duplicates. I tried amending it to
If ctl.Tag = "ED" Then
If ctl.Value > 0 Then
if ctl.oldvalue = 0 then
iProductID = DLookup("[ProductID]", "tblpricelist", "[FormName] = '" & ctl.name & "'")
DoCmd.SetWarnings False
DoCmd.RunSQL ("INSERT INTO tblQuoteLines (QuoteID, ProductID, SellPrice) VALUES (" & Me.QuoteId & "," & iProductID & "," & ctl.Value & ")")
DoCmd.SetWarnings True
End If
End If
End If
Next
But this is not doing anything - no error and no table update.
Thanks again.