I am working on an application for a gallery gift shop. The receipt printing function is designed to print, at the same time as the receipt, selected artist bios which are stored as Word documents in another folder. The path to the artist bios is stored as a hyperlink . In the onclick event of the Print button, I create a recordset and then loop through the detail records on the receipt, check whether a bio is requested and then whether one exists and if both are true to print using the Word object.
All of this works fine, my only little snag right now is that if someone buys more than one piece by the same artist they get the bio more than once. When playing around with DISTINCTROW I get an error message about hyperlinks not being compatible with DISTINCTROW. Is there a way around this? Perhaps a second recordset that filters the first after the hyperlink has been converted to a string? The SQL goes something as follows (I’m writing it from memory so don’t be too worried if I @#$!% up a comma or bracket
strSQL = “SELECT qryDetails.ReceiptNum, qryDetails.Biography, qryDetails.PrintBio FROM qryDetails ” & _
“WHERE qryDetails.ReceiptNum = ” & Me.ReceiptNum
Biography is the hyperlink and PrintBio is a Yes/No field. This SQL gives me every instance of a requested biography. I want it to only give me one instance of each biography.
Hopefully this is sufficient info. Thanks as always.