Good day all!
This is probably a dumb question, but how do I make IntelliSense show the argument options for a Public Sub that I created?
As you start typing EmpRep "REP", I would like the IntelliSense to show the acViewNormal and acViewPreview for the second argument ViewOrPrint.
How would I go about doing this?
Thanks in advance!
________________________________________
Buddha. Dharma. Sangha.
This is probably a dumb question, but how do I make IntelliSense show the argument options for a Public Sub that I created?
Code:
Public Sub EmpRep(shtGrpName As String, ViewOrPrint As String, myForm As Form)
Dim strDocName As String
Dim strOut As String
Dim strWhere As String
Dim varItem As Variant
Dim varItem2 As Variant
Dim FirstLB As ListBox
Dim SecondLB As ListBox
Dim dateFrom As TextBox
Dim dateTo As TextBox
Set dateFrom = myForm.Controls("txt" & shtGrpName & "from") '''''''''''''''''''''''''
Set dateTo = myForm.Controls("txt" & shtGrpName & "to") 'Set the references to the desired objects
Set FirstLB = myForm.Controls("lst" & shtGrpName & "_EMP") 'Employees ListBox '
Set SecondLB = myForm.Controls("lst" & shtGrpName) 'Reports ListBox ''''''''''''''''
strDocName = "Name of the report to Open"
dateFrom.SetFocus '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If dateFrom.Text = "" Then dateFrom.Value = "1/1/01" 'If nothing is entered in the textboxes, we will enter and extreme
dateTo.SetFocus 'range to select everything.
If dateTo.Text = "" Then dateTo.Value = "12/12/12" ''''''''''''''''''''''''''''''''''
If SecondLB.MultiSelect > 0 Then
If SecondLB.ItemsSelected.Count > 0 Then
For Each varItem2 In SecondLB.ItemsSelected
strDocName = SecondLB.ItemData(varItem2) 'Grab the first report selected
strOut = "" 'Clear the string strOut
If FirstLB.MultiSelect > 0 Then
If FirstLB.ItemsSelected.Count > 0 Then
For Each varItem In FirstLB.ItemsSelected '''''''''''''''''''''''''''''''''
On Error Resume Next 'Enumerate through the employee listbox to
strOut = strOut & "," & Chr(34) & FirstLB.ItemData(varItem) & Chr(34) 'grab all of the selected employees
If Err = 2501 Then Err.Clear '
Next varItem ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
strOut = Mid(strOut, 2) 'Truncate the leading ","
strOut = "In(" & strOut & ")"
Else
MsgBox "Select At least one Employee"
'Exit Sub
End If
End If '''''End first loop
strWhere = "(" & "([Employee])" & strOut & ")" 'Format the Where statement for the docmd.openreport
DoCmd.OpenReport strDocName, acViewPreview, , strWhere 'Open the current report
Next varItem2
Else
MsgBox "Select a Report"
'Exit Sub
End If
End If
dateFrom.SetFocus
If dateFrom.Text = "1/1/01" Then dateFrom.Value = ""
dateTo.SetFocus
If dateTo.Text = "12/12/12" Then dateTo.Value = ""
End Sub
As you start typing EmpRep "REP", I would like the IntelliSense to show the acViewNormal and acViewPreview for the second argument ViewOrPrint.
How would I go about doing this?
Thanks in advance!
________________________________________
