R
Ruth Enright
Andy: Thank you for responding. Your post did help, but I thought I'd
respond to your questions and get your feedback on my answers. Here goes:
The Rep-Matters form opens via a command button "on click" property. The
source is a table ("Matter_Number_Per_Rep") that is the "many" side of a
"one-to-many" relationship with the Bridge table. (The Bridge table creates
a "many-to-many" relationship between the clients and the representatives so
that various subdivisions of clients can be connected with various
representatives.) The "Matter_Number_Per_Rep" table does have the rep first
and last names (as well as the client number and client rep number). I
greatly appreciate your input on this. From what you've told me, I'm
guessing that I should have based the form on a query that contains the
Bridge Table and the Matter Number Per Rep Table." In the meantime, the code
in the "on click" property of the command button is:
Private Sub OpenMatterQuery_Click()
On Error GoTo Err_OpenMatterQuery_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "MATTER_NUMBER_PER_REP"
stLinkCriteria = "[ClientRepCode]=" & "'" & Me![ClientRepCode] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OpenMatterQuery_Click:
Exit Sub
Err_OpenMatterQuery_Click:
MsgBox Err.Description
Resume Exit_OpenMatterQuery_Click
End Sub
respond to your questions and get your feedback on my answers. Here goes:
The Rep-Matters form opens via a command button "on click" property. The
source is a table ("Matter_Number_Per_Rep") that is the "many" side of a
"one-to-many" relationship with the Bridge table. (The Bridge table creates
a "many-to-many" relationship between the clients and the representatives so
that various subdivisions of clients can be connected with various
representatives.) The "Matter_Number_Per_Rep" table does have the rep first
and last names (as well as the client number and client rep number). I
greatly appreciate your input on this. From what you've told me, I'm
guessing that I should have based the form on a query that contains the
Bridge Table and the Matter Number Per Rep Table." In the meantime, the code
in the "on click" property of the command button is:
Private Sub OpenMatterQuery_Click()
On Error GoTo Err_OpenMatterQuery_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "MATTER_NUMBER_PER_REP"
stLinkCriteria = "[ClientRepCode]=" & "'" & Me![ClientRepCode] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_OpenMatterQuery_Click:
Exit Sub
Err_OpenMatterQuery_Click:
MsgBox Err.Description
Resume Exit_OpenMatterQuery_Click
End Sub