Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy Form Record NOT Calculated Fields

Status
Not open for further replies.

LJtechnical

Technical User
Aug 7, 2002
90
0
0
GB
Hi All,

I have a form "Quotes" and Subfom "Quote Content" I am trying to set up a method of revising the quotation i.e. copying the record to a new rec and changing the unique quote number(suffixing with R1 etc). The latter is quite simple, its the copying recod bit thats causing me a headache, I have somthing that kind of works for the main form but comes up with paste errors, see below code:


Case 1 'Revise Current Quote
Dim temp1 As Integer
temp1 = Me!QNum
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
Me!QNum = temp1
Me!Revision = Me!Revision + 1
Me![Status Indicator] = 3
If QuoteType = 1 Then
Me!QuotationNo = "UK" & Me!QNum & "R" & Me!Revision
ElseIf QuoteType = 2 Then
Me!QuotationNo = "EX" & Me!QNum & "R" & Me!Revision
End If
End Select

I have looked at using INSERT INTO sql from other threads but to no joy. Is this the better way to go, because I would also like to copy the contents of the subform.

Any tips welcomed.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top