Oh , nevermind lol. Sorry, I correted the spelling in the subform name so thats why it erored. Returned it to normal and now its working
Thank you so much for ll your help. I do ppreciate it![]()
I went live with my database today and Im adding qoutes and hitting convet to invoice. For some reason the sunform only copies one record to the invoice subform nstead of all the records. Is there a tweak I can add to my code so that it copies all the records from the qouteDetailsSubform to the invoicedetailssubform?
The code is only intended to copy one record and nothing in your posts indicated you wanted to copy multiple records. Try this:
Misspelling of Quote driving me nuts.Code:DoCmd.OpenForm "InvoiceDataEntryF", acNormal, , , acFormAdd, acWindowNormal Forms!InvoiceDataEntryF![CustomerID] = Me![CustomerID] Forms!InvoiceDataEntryF![VAT] = Me![VAT] Forms!InvoiceDataEntryF![InvoiceNotes] = Me![QouteNotes] DoCmd.RunCommand acCmdSaveRecord CurrentDb.Execute "INSERT INTO InvoicDetailsT(InvoiceID, Code, Qty, IPrice) SELECT " & _ Forms!InvoiceDataEntryF.InvoiceID & _ " AS IID, Code, Qty, QPrice FROM QouteDetailsT WHERE QouteID=" & Me.QouteID Forms!InvoiceDataEntryF.[InvoicDetailsTSubform].Requery
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Lol...IOkay I changed all the qoutes to Quotes and had to redo the Quotes form but it's now working as it should thanks to your new code![]()
You might also want to correct InvoicDetailsT and InvoicDetailsTSubform to include the 'e' in Invoice. Also remove space from QuoteDetails Subform or replace with T to be consistent with InvoicDetailsTSubform. Or remove that T.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.