G
Guest
I have and Access application, one of the forms uses two tables (donors,
donations) they are connected by 'donor-id'.
I am getting a Compile Error (Qualifier must be collection). The code
follows:
Private Sub Donors_Click()
On Error GoTo Err_Donors_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Donor Donations"
stLinkCriteria = "[donor-id]=" & Me![donor-id]
*** donations![donor-id] = doners![donor-id]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Donors_Click:
Exit Sub
Err_Donors_Click:
MsgBox Err.Description
Resume Exit_Donors_Click
End Sub
The statement that causes the error is marked ***. What am I doing wrong?
Please help.
donations) they are connected by 'donor-id'.
I am getting a Compile Error (Qualifier must be collection). The code
follows:
Private Sub Donors_Click()
On Error GoTo Err_Donors_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Donor Donations"
stLinkCriteria = "[donor-id]=" & Me![donor-id]
*** donations![donor-id] = doners![donor-id]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Donors_Click:
Exit Sub
Err_Donors_Click:
MsgBox Err.Description
Resume Exit_Donors_Click
End Sub
The statement that causes the error is marked ***. What am I doing wrong?
Please help.