M
Margretta
I have a form with multiple subforms used to sort associated record
sets of rates and the related governing rules. I will be launching it
as an application to allow users to query the form and obtain the rate
data with the appropriate rule(s).
Knowing that the most common complaint with my internal documents is
that the font is too small, I would like to create a double click event
on a field in one of my subforms that will open a new form to display
the same record, but with a much larger font size.
I have created the double click event with the DoCmd.OpenForm command,
then created an If/EndIf statement with filtering criteria, but the pop
up form is clearly not able to apply the criteria and determine which
record it should be using. I'm fairly new to Access and VERY new to
incorporating VBA script, so I would appreciate any thoughts or help
people may have.
Here is my code for the pop up with criteria:
Private Sub CommodityNote_DblClick(Cancel As Integer)
Dim ComNote As String
DoCmd.OpenForm "CommodityNotesQuery"
If Not IsNull(Forms![Rate Search Cleaned
Up]![CommodityNotes].Form!CommodityNote) Then
ComNote = ComNote & "([NoteNo] = " & (Forms![Rate Search
Cleaned Up]![CommodityNotes].Form!NoteNo) & ") AND "
ComNote = ComNote & "([NoteSub] = " & (Forms![Rate Search
Cleaned Up]![CommodityNotes].Form!NoteSub) & ") AND "
End If
Forms![CommodityNotesQuery].Form.Filter = ComNote
Forms![CommodityNotesQuery].Form.FilterOn = True
End Sub
Thanks,
Margretta
sets of rates and the related governing rules. I will be launching it
as an application to allow users to query the form and obtain the rate
data with the appropriate rule(s).
Knowing that the most common complaint with my internal documents is
that the font is too small, I would like to create a double click event
on a field in one of my subforms that will open a new form to display
the same record, but with a much larger font size.
I have created the double click event with the DoCmd.OpenForm command,
then created an If/EndIf statement with filtering criteria, but the pop
up form is clearly not able to apply the criteria and determine which
record it should be using. I'm fairly new to Access and VERY new to
incorporating VBA script, so I would appreciate any thoughts or help
people may have.
Here is my code for the pop up with criteria:
Private Sub CommodityNote_DblClick(Cancel As Integer)
Dim ComNote As String
DoCmd.OpenForm "CommodityNotesQuery"
If Not IsNull(Forms![Rate Search Cleaned
Up]![CommodityNotes].Form!CommodityNote) Then
ComNote = ComNote & "([NoteNo] = " & (Forms![Rate Search
Cleaned Up]![CommodityNotes].Form!NoteNo) & ") AND "
ComNote = ComNote & "([NoteSub] = " & (Forms![Rate Search
Cleaned Up]![CommodityNotes].Form!NoteSub) & ") AND "
End If
Forms![CommodityNotesQuery].Form.Filter = ComNote
Forms![CommodityNotesQuery].Form.FilterOn = True
End Sub
Thanks,
Margretta