Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Select Query Criteria 1

Status
Not open for further replies.

CharlieT302

Instructor
Mar 17, 2005
406
US
Hi All,

I need help with a simple criteria. I have a form that uses a drop-down control to display a list of projects that were completed after a specific date. The date is entered manually in an unbound control; also on the form. The Row Source of the drop-down uses a criteria to read the Date control.

Date Control:
Name = [Date_Comp]
Default Value = ""
Format = Short Date
Input Mask = 99/99/0000


Drop-Down Display:
Field: NZ([Proj_Comp],"0")
Criteria: Like IIF([forms]![frm_Main_Proj].[Date_Comp]="","*",>[forms]![frm_main_proj].[Date_Comp])

Note:
When the following part of the criteria is used by itself, it works. Only when combined in the full statement does it fail. Ideas?

>[forms]![frm_main_proj].[Date_Comp]


Thanks

 
What about this ?
Criteria: >Nz([forms]![frm_main_proj]![Date_Comp],0)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks PHV,

That worked very well. I also liked the fact that it was a simpler statement than the one I had proposed. I am still not sure what was wrong with my original statement.

I have used that same technique countless times in the past without problem. Although, it was usually with Text fields. Just for future reference, does the fact that I was working with dates account for the problem?

At any rate thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top