L
Lynndyhop
Hi there!
This discussion group is a lifesaver and I'm asking for a life ring one more
time....
I have a Form with a Subform of invoices. The form is linked to a table with
ReferenceID being the Key. The Subform is linked to a table 'Invoices' with a
key InvoiceID and is linked in relationships with a one ReferenceID to many
InvoiceID. I have created the report and am working on the code for the cmd
button and keep getting an error ' Method or data Member Not found'.
I've *starred* the text the error is highlighting. Here is the code:
Private Sub PreviewInvoice_Click()
On Error GoTo Err_PreviewInvoice_Click
Dim MyWhereCondition As String
MyWhereCondition = "ReferenceID= " & Me*.ReferenceIDtxt* & " AND InvoiceID =
" & Me.FormMembershipInvoices.Form.InvoiceIDtxt
DoCmd.OpenReport " MembershipInvoicesGeneration ", acPreview, ,
MyWhereCondition
Exit_PreviewInvoice_Click:
Exit Sub
Err_PreviewInvoice_Click:
MsgBox Err.Description
Resume Exit_PreviewInvoice_Click
End Sub
Many many thanks for your help!!
This discussion group is a lifesaver and I'm asking for a life ring one more
time....
I have a Form with a Subform of invoices. The form is linked to a table with
ReferenceID being the Key. The Subform is linked to a table 'Invoices' with a
key InvoiceID and is linked in relationships with a one ReferenceID to many
InvoiceID. I have created the report and am working on the code for the cmd
button and keep getting an error ' Method or data Member Not found'.
I've *starred* the text the error is highlighting. Here is the code:
Private Sub PreviewInvoice_Click()
On Error GoTo Err_PreviewInvoice_Click
Dim MyWhereCondition As String
MyWhereCondition = "ReferenceID= " & Me*.ReferenceIDtxt* & " AND InvoiceID =
" & Me.FormMembershipInvoices.Form.InvoiceIDtxt
DoCmd.OpenReport " MembershipInvoicesGeneration ", acPreview, ,
MyWhereCondition
Exit_PreviewInvoice_Click:
Exit Sub
Err_PreviewInvoice_Click:
MsgBox Err.Description
Resume Exit_PreviewInvoice_Click
End Sub
Many many thanks for your help!!