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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADOTable Filtering

Status
Not open for further replies.

MLNorton

Programmer
Nov 15, 2009
134
US

I have two forms, MAIN and DISPLAY. On the Main Form I create an Integer variable. "Today", of the current date in the format YYYYMMDD. On the DISPLAY Form I have a DBgrid. One of the fields in the DBGrid is an Expriation Date as integer, "ExpDate", in the format YYYMMDD.

I have tried to Filter both in the ADOTable Object Inspector and in code as follows:

In code:
Filter := 'ExpDate >= Today'

In Object Inspector:
Filter ExpDate >= Today

If I use an actual interger value, 20101103, Filtering works.
If iI use the integer variable, "Today", Filtering does not work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top