I am having some problems coding criteria for a query. What I am doing is a QBF query to pull information from a form. For this particular field I am wanting to enable the user enter either one or two fields to query by. If the user enters two criteria, I am wanting it to query between the two entries, and if just one is entered I want only that specific entry. Here is what I have so far, please let me know what needs to be changed if this is even possible. I am pretty new to Access and this is probably pretty rough.
"If [Forms]![frmSearch]![txtFrequency2] Is Null Then
[Queries]![qrySearch]![Frequency] = [Forms]![frmSearch]![Frequency1] Or [Forms]![frmSearch]![Frequency1] Is Null Else [Queries]![qrySearch]![Frequency] = Between [Forms]![frmSearch]![txtFrequency1] And [Forms]![frmSearch]![txtFrequency2] Or [Forms]![frmSearch]![txtFrequency1] Is Null"
Thanks in advance,
Jonathan
"If [Forms]![frmSearch]![txtFrequency2] Is Null Then
[Queries]![qrySearch]![Frequency] = [Forms]![frmSearch]![Frequency1] Or [Forms]![frmSearch]![Frequency1] Is Null Else [Queries]![qrySearch]![Frequency] = Between [Forms]![frmSearch]![txtFrequency1] And [Forms]![frmSearch]![txtFrequency2] Or [Forms]![frmSearch]![txtFrequency1] Is Null"
Thanks in advance,
Jonathan