PDA

Click to See Complete Forum and Search --> : Too few parameters. Expected 2. ERROR


Bebe
Apr 6th, 2000, 02:17 AM
I receive the error: Too few parameters. Expected 2. when I run the below code. I have never written a parameter in VB can someone help me out with what is wrong with the below code?

Data1.RecordSource = "PARAMETERS [FROM DATE] DateTime [TO DATE] DateTime;"
Data1.RecordSource = "SELECT * from MASTER where DATE_OPENED between [FROM DATE] AND [TO DATE]"

Bigley
Apr 6th, 2000, 04:36 AM
I've never used code like that but it seems to me that you might simply be missing a comma after the first "DateTime".
I have put it in below-

Data1.RecordSource = "PARAMETERS [FROM DATE] DateTime, [TO DATE] DateTime;"