M
msmuzila
I have a query that take in the value of one text box through a fuction
which makes sure the forms is already loaded:
Here is the query criteria:
Combo30(33)
Now i want the criteria to have multiple text boxes
Here is the function:
Public Function GetCombo30(ByVal lngID As Long) As Long
On Error Resume Next
Dim lngCombo30 As Long
' You'll need an IsLoaded or equivilent function
If CurrentProject.AllForms("Product_Sales_Monthly").IsLoaded Then
lngCombo30 = Forms!Product_Sales_Monthly!Text42
Else
lngCombo30 = lngID
End If
GetCombo30 = lngCombo30
End Function
which makes sure the forms is already loaded:
Here is the query criteria:
Combo30(33)
Now i want the criteria to have multiple text boxes
Here is the function:
Public Function GetCombo30(ByVal lngID As Long) As Long
On Error Resume Next
Dim lngCombo30 As Long
' You'll need an IsLoaded or equivilent function
If CurrentProject.AllForms("Product_Sales_Monthly").IsLoaded Then
lngCombo30 = Forms!Product_Sales_Monthly!Text42
Else
lngCombo30 = lngID
End If
GetCombo30 = lngCombo30
End Function