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

ReQuery Datagrid to display Part of DataSource

Status
Not open for further replies.

GeromeEo

Programmer
Feb 26, 2001
3
US

I am using two tables and from an Oracle database (LOCALDATE [adoRecordSource],MWHActuals [adoDataSource).

I want the user to select a day (01/22/2002) from a DataComboBox (from LOCALDATE) dropdown menu, click a SEARCH command button (cmdGetData), and populate a datagrid(grdMWHActuals). The datagrid's data source (MWHActuals) contains two months of data. I need it to re-query from the datagrid source (adoDataSource)and present only that day's data requested. Both tabels have UTCTIME and LOCALTIME fields.

I can get a date from LOCALDATE to be selected then show up in the DataCombo box, but do not know how to use it via the command button and ADOs to recreate a where clause to only show 'that' day in the grid.

Anyone ever do this?
 
You might try setting the filter property of the underlying recordset. I have done it this way and it was not too difficult.
A word of warning. When you look up the example of using the filter property, it contains single quotes around the comparison value. THIS IS NOT A TYPO. You really need to use single quotes in order for it to work correctly.

Good Luck,
Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top