PDA

Click to See Complete Forum and Search --> : query database with a variable?


Bebe
Mar 24th, 2000, 02:53 AM
I have an application i am creating where the user inputs complaints received by date and some other factors. At the end of each month they need to generate a report or they should. They need to be able to go back and pull up records from old months and years or current. Dates are in the database in this format 3/1/00 or 5/1/95 etc.

I figured I should ask them in a cbo box one for the month and one for the year for the report generation.

I need to take these inputs for month and year and query the database. If they select "March" and in the other box select "2000" how do i get this information to go query the database with numbers formatted 3/3/00. Should I do this some other way? Does anyone have any ideas on how I should do this. I would be interested in the exact code needed to take a variable and query the database with it. For example if I make a variable out of cboMonth how do i take that variable and query the database for just the Month in a field from the database where the month is attached to the day and year?

Thank You

JHausmann
Mar 24th, 2000, 11:59 PM
if you're using VB6, use the dtp (datetime picker) control.