Hi to all VB experts!

i'm a newbie in VB. I have this problem regrading dateformat. can i use the format function inside a query?? i dont know whats wrong with my code. it returns an error message "too few parameters. Expected1".

The code gets the user inputs "months.text" and "year.text" and gets the records that are equal to the month and year of the date field.

The date field format is mm/dd/yyyy and the user inputs the month with mmm format (i'm using a combo box. user can choose whether he/she wants to view the data with the month Jan, Feb, and so on.)

Please help me with my dilemma.

Thanks in advance!!

CODE:

Data1.RecordSource = "Select publisher, address, postalcode, tel, fax, isbn, publication, author, edition, l_used, b_used From isbn Where datepart('mmm', #" & Format(Date, "mmm-dd-yyyy") & "#) = " & months.Text & " AND datepart('yyyy',date) = " & year.Text & " "
Data1.Refresh