K
Kirstie Adam
All,
I have a simple bit of code (created by using button wizard) that opens a
new form and finds a certain record. Linked by [Address Line 1].
However, i would like to also link it by [Company Name], as sometimes two
companies have the same [Address Line 1].
How would i do this?
-------------------------------------------
Private Sub Command88_Click()
On Error GoTo Err_Command88_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Add New Address Frm"
stLinkCriteria = "[Address Line 1]=" & "'" & Me![Address] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command88_Click:
Exit Sub
Err_Command88_Click:
MsgBox Err.Description
Resume Exit_Command88_Click
End Sub
I have a simple bit of code (created by using button wizard) that opens a
new form and finds a certain record. Linked by [Address Line 1].
However, i would like to also link it by [Company Name], as sometimes two
companies have the same [Address Line 1].
How would i do this?
-------------------------------------------
Private Sub Command88_Click()
On Error GoTo Err_Command88_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Add New Address Frm"
stLinkCriteria = "[Address Line 1]=" & "'" & Me![Address] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command88_Click:
Exit Sub
Err_Command88_Click:
MsgBox Err.Description
Resume Exit_Command88_Click
End Sub