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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I want to convert quotes to orders plesae :) 1

Status
Not open for further replies.

blurworld

Programmer
Sep 19, 2001
46
GB
hi,

i've tried everything but i don;t seem to be able to find a solution to this, so please help,
i have a quote table with many related quote lines table(each product group quoted) and order table with many related order lines table (again each product group quoted), i would like to copy quote detail to order detail please when a user clicks a button on the quote form.
Any ideas??? thanx

-Martin
 
I ran into this problem also. I have a solution but it may not be the perfect solution but it worked for me and solved my problem.

You have the quote form that has all of you data on it. You will save all of that information into a seperate Table "Order_Table", this will keep it 'clean'. This way you can change you relationship table and that info will not be reflected on old orders.(i.e. If John ordered a vacum last feb, it was shipped to cananda, the price was 5.00 and you talked to sally. Since then he moved and the vacum is now 7.00.) Your data will be saved at the time th order was placed.

Anyway the coded is here. Create a click event and write the VBA as follows:

Private Sub Command3_Click()
Dim rst As Object: Set rst = CurrentDb.OpenRecordset("Order_Table")
Dim VarXX As Variant


If IsNull(Me!Text1) Then
MsgBox " Please enter a Company in the Company Name field"
Else

With rst
.AddNew
!CompanyName = Me!Text1
!StateOrProvince = Me!Text12
!PostalCode = Me!Text14
!Country = Me!Text16
!PhoneNumber = Me!Text18
!Extension = Me!Text20
!FaxNumber = Me!Text22
!Etc.... = Me!Text24
.Update
End With
Set rst = Nothing
MsgBox " You Order has been placed! "
' Here you add a print function etc..
DoCmd.Close
DoCmd.OpenForm "Company_List", , , stLinkCriteria
End If

End Sub

If anyone has a better solution or idea please update.
 
DOA, This would make a great FAQ! Thanks for sharing.
 
hi, ok seems u've misunderstood me entirely,

when i said order detail i mean the Product Name, Quantity etc, not anythign to do with customer, that forms a relation with the order process/enquiry table earlier on (that is the table which relates the order and quote together), i need to copy each record of detail to the order detail table and then relate these back to a new order! this is so that if the entire quote is not kept changes can be made to it,

i hope this is making some sense now, its pretty complex,

thanx
-Martin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top