I'm not really good with vba can you right in detail. What you referred me to is not in detail. Maybe i need to explain a little more.
I have a form it's call frmRnCompletion. It has id field name RNcompletionID (number filed).
I have a form called qryCSGAuditWorksheet it also has a RNcompletionID (it's linked to RNcompletion table)
I want to create a button on the frmRNcompletion form it opens up the report associated to.
This is what I have written so far:
Private Sub Command27_Click()
On Error GoTo Err_Command27_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "qryCSGAuditWorksheet"
DoCmd.OpenReport stDocName,acViewPreview,,
what elese do I need to?