I have a form 'b', that when the on-click event is activated I want the following to happen
a) Open another form called 'food' showing just the record(s) that form (b) shows.
The link I have between forms is a number field called 'isn'
So will the code look something like?
(I know I have the stLinkCriteria line completely wrong and this code would only open the current record shown (not all the ones the form 'b' has filtered - it may filter 1 or more)
Please help
On Error GoTo Err_Command13_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "food"
stLinkCriteria = "[isn]=" & Chr(34) & Me![isn] & Chr(34)
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormEdit
DoCmd.Maximize
Exit_Command13_Click:
Exit Sub
Err_Command13_Click:
MsgBox Err.Description
Resume Exit_Command13_Click
a) Open another form called 'food' showing just the record(s) that form (b) shows.
The link I have between forms is a number field called 'isn'
So will the code look something like?
(I know I have the stLinkCriteria line completely wrong and this code would only open the current record shown (not all the ones the form 'b' has filtered - it may filter 1 or more)
Please help
On Error GoTo Err_Command13_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "food"
stLinkCriteria = "[isn]=" & Chr(34) & Me![isn] & Chr(34)
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormEdit
DoCmd.Maximize
Exit_Command13_Click:
Exit Sub
Err_Command13_Click:
MsgBox Err.Description
Resume Exit_Command13_Click