G
Guest
I seem to be getting caught on all the smaller issue. Sorry if this is too
easy, but...
This question is broken into two parts:
I have a form with three criteria, selectable by one combo box each. When
the criteria is filled out the user operates a command button which opens a
form and list items filtered by the criteria.
I have an IF loop that monitors the values of the criteria combo box and
passes a string to the next form that edits the list box RowSource property.
Question 1:
I use the statment
If (Me.Combo_Plant.Value = Null) Then
QueryPass = "qry_All_DB"
else if ..... more code
QueryPass is a public variable defined as a string.
but even if the value in the combo box is null (as indiciated by the
immediate window) the code jumps this step. i.e. does not acknowledge null
value
Question 2:
Is passing as public variable between two forms the best solution? To use
this method I have to set a query up for each different incident of criteria.
i.e.
all criteria null - 1 query, 1 criteria filled - another query, criteria
filled - another query, all criteria filled - antoher query
Would it be better to pass and SQL statement to the list box so it builds
its own query each time? Which is faster and easier to code?
Thank-you for any help
easy, but...
This question is broken into two parts:
I have a form with three criteria, selectable by one combo box each. When
the criteria is filled out the user operates a command button which opens a
form and list items filtered by the criteria.
I have an IF loop that monitors the values of the criteria combo box and
passes a string to the next form that edits the list box RowSource property.
Question 1:
I use the statment
If (Me.Combo_Plant.Value = Null) Then
QueryPass = "qry_All_DB"
else if ..... more code
QueryPass is a public variable defined as a string.
but even if the value in the combo box is null (as indiciated by the
immediate window) the code jumps this step. i.e. does not acknowledge null
value
Question 2:
Is passing as public variable between two forms the best solution? To use
this method I have to set a query up for each different incident of criteria.
i.e.
all criteria null - 1 query, 1 criteria filled - another query, criteria
filled - another query, all criteria filled - antoher query
Would it be better to pass and SQL statement to the list box so it builds
its own query each time? Which is faster and easier to code?
Thank-you for any help