I have a VB6 form with bound ADODB dc which needs to query (adcmdText sql SELECT)an Access 2002 db table date field in order to match a user input textbox entry (TxtCtrtYear) on the form and then display matches. The Access date field (Start_Date) is formatted as short date and so is the display text box. Both of these need to remain in that format. I can't figure out how to extract the year value from the date field in order to make the query work. I'd appreciate any help w/ the syntax. Thanks. --Ed
Here's my query code:
SELECT * FROM Contract WHERE Start_Date = '" & TxtCtrtYear.Text & "'
Here's my query code:
SELECT * FROM Contract WHERE Start_Date = '" & TxtCtrtYear.Text & "'