Bebe
Apr 5th, 2000, 09:48 PM
Can anyone help me with the code using VB6 and using SQL code to:
the user selects from a drop down box the month from one drop down box and the year from another drop down box
cboMonth
cboYear
cboMonth leaves you with text, example "January". I think I would then need to turn this into "1" somehow. the Year is formatted as 2000 but I need it to query the database as "00"
How do I take what the user selects in a form and query the database date for just the month and year; doing nothing with the day.
The report for example is run once a month. If they select March. They need to get a count of how many records were inputted for the month of March. I use the field Date_Opened to query this as it is a required field. So when they select March for the month and 2000 for the year or 00 I need it to go to the database select Date_Opened and look for all records beginning in that field with "3" and then query the year portion and find only records that are from the cboYear field. So although I have a day, I need to do nothing with that field.
Anybody have any good ideas on how I could do this with code or the SQL code to do this,
thanks in advance :)
the user selects from a drop down box the month from one drop down box and the year from another drop down box
cboMonth
cboYear
cboMonth leaves you with text, example "January". I think I would then need to turn this into "1" somehow. the Year is formatted as 2000 but I need it to query the database as "00"
How do I take what the user selects in a form and query the database date for just the month and year; doing nothing with the day.
The report for example is run once a month. If they select March. They need to get a count of how many records were inputted for the month of March. I use the field Date_Opened to query this as it is a required field. So when they select March for the month and 2000 for the year or 00 I need it to go to the database select Date_Opened and look for all records beginning in that field with "3" and then query the year portion and find only records that are from the cboYear field. So although I have a day, I need to do nothing with that field.
Anybody have any good ideas on how I could do this with code or the SQL code to do this,
thanks in advance :)