BuildCriteria Method Example
BuildCriteria Method - The BuildCriteria method returns a criteria string
as it would appear in the criteria line in the query design grid.
For example, you may want to set a form's Filter or ServerFilter property based on varying
criteria from the user. You can use the BuildCriteria method to construct the
string expression argument for the Filter or ServerFilter property.
The BuildCriteria Method has the following structure:
strVar = BuildCriteria (fieldname, fieldtype, expression)
fieldname is the name of the field in the record source of the form.
fieldtype is an integer constant for the data type of the field.
The field type can be any of the following constants:
Our programming team has 15 members containing a wide variety of technical database knowledge and programming experience. We are kind of like Allstate Insurance - 'we have seen it before'.
Did you know you don't need to move to SQL/Server to run and manage your Access database on the net. There are many alternative solutions. Among them are Amazon's AWS cloud services and various hosting services in nearly every state.
expression is string containing the criteria.
Here's an example:
Dim strCriteria As String
strCriteria = BuildCriteria ("OrderDate", dbDate, ">1-1-95")
This example returns the following criteria string: