Hey everybody,
What I want to do is when a user selects a couple parts # from the list box, some of the information from TblPartsTracking, TblCients, TblParts will be put into a tmp table so that a report can use those...
I have been able to create a strSQL as follow:
So basically, when the user click on the preview button, it will DoCmd.OpenReport ''rptname'', acViewPreview
where rptname is bound to the tmp table..
Now, the thing is, is that everytime the user selects parts and clicks on preview, TblTmp1 needs to be cleared from it's content so that the new content can be stored...
Thanks
What I want to do is when a user selects a couple parts # from the list box, some of the information from TblPartsTracking, TblCients, TblParts will be put into a tmp table so that a report can use those...
I have been able to create a strSQL as follow:
Code:
strSQL = "INSERT INTO TblTmp1 ( CustomerID, CompanyName, PartNumber, Weight, TagNumber, Drums, Quantity, Fini, Épaisseur ) " & _
"SELECT TblPartsTracking.CustomerID, TblClients.CompanyName, TblPartsTracking.PartNumber, TblPartsTracking.Weight, TblPartsTracking.TagNumber, TblPartsTracking.Drums, TblPartsTracking.Quantity, TblParts.Fini, TblParts.Épaisseur " & _
"FROM (TblClients INNER JOIN TblPartsTracking ON TblClients.CustomerID = TblPartsTracking.CustomerID) INNER JOIN TblParts ON TblPartsTracking.PartNumber = TblParts.PartNumber "
So basically, when the user click on the preview button, it will DoCmd.OpenReport ''rptname'', acViewPreview
where rptname is bound to the tmp table..
Now, the thing is, is that everytime the user selects parts and clicks on preview, TblTmp1 needs to be cleared from it's content so that the new content can be stored...
Thanks