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

Mail Report From Form 1

Status
Not open for further replies.

sha123

Programmer
Nov 13, 2002
58
ZA
I've got a form called QC(Quality Control),its got a ID And Supplier.I need to mail this report to the Supplier,whem I mail it, it sends all the records in my Report to the Supplier.

Is there a code I can use just to send the QC form Ive completed to the Supplier and not the whole bunch?



 
In the RecordSource of the Report itself put:-

"SELECT * FROM tblTableName WHERE PrimeKeyId = " & Forms!QC!Id


That will then match only the record that is current on the form QC and send that.


( I assume you are using DoCmd.SendObject )


'ope-that-'elps.

G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.
 
Still does not work.is sends all my reports!!!Hope you've got any other ideas?
 
What do you mean "sends all my reports!!!"

Do you mean "sends all my Records in the report" ?



G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.
 
Then you cannot have
In the RecordSource of the Report itself put:-

"SELECT * FROM tblTableName WHERE PrimeKeyId = " & Forms!QC!Id


set up correctly.

Placing the WHERE clause in the Report's RecordSource will limit the report's contents to JUST the record that matches.


The PrimeKeyId should be the name of the field ( in the table tblTableName where the report's source data resides ) which is used to identify the record that you want to send ( Primary Key ? ) and Id is the name of the control on the QC form that is bound to this field.


'ope-that-'elps.


G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top