Hi all,

1) May some pls tell what's wrong with this coding as the system prompt me for a syntax error.
I'm trying to link my recordset to the data report for printing.

VB Code:
  1. Private Sub CmdPrint_Click()
  2. Call connectDB
  3. sql = "SELECT distinct * FROM Invoice WHERE Invoice='"
  4. rs.Open sql, cn, adOpenStatic, adLockOptimistic
  5. Set InvoiceReciept.DataSource = rs
  6. InvoiceReciept.Show
  7. End Sub

2) Can a data report be used to linke differnt fields together? For example, CustID from customer table, Invoiceid from invoice table and CarID from Car Table. Is it possible?