Results 1 to 3 of 3
  1. #1
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Too few parameters, expected 0 (Access 2003 SP2)

    I get the aforementioned error when i try to execute the following line:
    <pre> CurrentDb.Execute "qryJobsSummaryAppend2Table", dbFailOnError
    </pre>

    in
    <pre> Set qdf = CurrentDb.QueryDefs("qryJobsSummaryAppend2Table")
    qdf.Parameters("Forms!frmChooseVenue!LabelStart.Ca ption") = Forms!frmChooseVenue!LabelStart.Caption
    qdf.Parameters("Forms!frmChooseVenue!LabelEnd.Capt ion") = Forms!frmChooseVenue!LabelEnd.Caption
    CurrentDb.Execute "qryJobsSummaryAppend2Table", dbFailOnError
    Set qdf = Nothing
    </pre>


    The query is an append query that is based upon queries within queries.
    Is the problem parameters in an append query?

    Can someone help me here.
    I can include the other queries if you like.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Too few parameters, expected 0 (Access 2003 SP2)

    I think the problem is that you don't use the querydef. Try changing the problem line to

    qdf.Execute dbFailOnError

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Too few parameters, expected 0 (Access 2003 SP2)

    Thank you Hans, that was it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •