Search results

  1. P

    Querying recordsets with user input as dates

    Hi namilian, this has now caught the third parameter and is recognising it. when i hover over it in debug it shows the input selected on the form. I am now getting a new error run time 3075 error in syntax. in debug it highlights the last line of my code as posted below: sResults = ""...
  2. P

    Querying recordsets with user input as dates

    Hi namilian, this has now caught the third parameter and is recognising it. when i hover over it in debug it shows the input selected on the form. I am now getting a new error run time 3075 error in syntax. in debug it highlights the last
  3. P

    Querying recordsets with user input as dates

    Hi Namilian, Thanks for getting back in touch, you were a great help last time. I have changed the set up slightly and declared the parameter as a string so it now looks like: Dim Date1 As Date Dim Date2 As Date Dim Dept As String Date1 = Form_Menu.Combo1.Value Date2 = Form_Menu.Combo2.Value...
  4. P

    Querying recordsets with user input as dates

    i have now tried to put a futher parameter in to the SQl statement and am getting a run time error 3061 to few parameters expected. here is my code that works sResults = "SELECT * FROM Saved_Data WHERE (((Saved_Data.A5)>= #" & Format(Date1, "MM/DD/YYYY") & "# And (Saved_Data.A5) <= #" &...
  5. P

    Run time error 3061 too few parameters. expected 1

    hi i have a form that takes input from a user and queries a table with that input. At the moment it takes a start date and end date from a user and thos works fine. i have tried to incorporate a futher paramenter of department from the user and am experiencing an error. Dim Db As...
  6. P

    Querying recordsets with user input as dates

    thank you namlian it was the date format. i have been looking at it for ages and couldnt understand why it was happening, cheers.
  7. P

    Querying recordsets with user input as dates

    Hi, both date fields are passed from a calendar control. when i use the calendar control in a query the result is perfect every time. A5 is set as datefield. it seems to be finding everything before the end date but ignoring the start date. i.e. when i search for jan i get jans result when i...
  8. P

    Querying recordsets with user input as dates

    i have created a recordset from a table and then using user input as start date and end date i take a record count of the record set. the code works ok but the count it returns is not correct is certain instances. i have copied the code into a query and the results there are fine but they are...
Back
Top Bottom