Results 1 to 6 of 6
  1. #1
    dongodu is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    11

    Error in Run Time

    rs.Open "select * from reser where res_date between #" & Text1.Text & "# and #" & Text2.Text & "#", con, 1, 3

    Run Time Error
    No value given for parameters

  2. #2
    SteveH2508 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2010
    Location
    Chelsea, London, England
    Posts
    117
    you cannot use Text1.Text etc. - try Text1.Value or just Text1.

  3. #3
    dongodu is offline Novice
    Windows XP Access 2003
    Join Date
    May 2011
    Posts
    11
    Used as per sugessted, same error, i am giving Date as input to filter records in report

  4. #4
    SteveH2508 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2010
    Location
    Chelsea, London, England
    Posts
    117
    1. Are you using DAO or ADO? (I guess ADO which is not my area)
    2. What is the , con, 1, 3 at the end sopposed to mean?

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I think con is the connection string to the database, the other variables I'm not sure about.

    add this line right before your SQL code and see if you are getting return values for your two date fields

    msgbox Text1 & ", " & text2

    Make sure you are getting values for them first. If you are there's something wrong with the SQL statement, if you aren't it's something wrong with your retrieval of text1 and text2, are text1 and text2 on a subform or a main form?

    If they're on a subform you may need to reference them like

    forms!mainformname.subformname!text1

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by rpeare View Post
    forms!mainformname.subformname!text1
    According to this link the syntax would be: forms!mainformname.subformname.FORM!text1
    http://access.mvps.org/access/forms/frm0031.htm

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 12-23-2010, 09:11 AM
  2. Replies: 2
    Last Post: 12-02-2010, 02:35 AM
  3. Run time error
    By vaikz in forum Import/Export Data
    Replies: 1
    Last Post: 02-18-2010, 11:37 PM
  4. Run Time Error 3078
    By jimjaix in forum Access
    Replies: 2
    Last Post: 02-02-2010, 12:17 PM
  5. Run Time Error 424
    By ddog171 in forum Programming
    Replies: 3
    Last Post: 02-04-2006, 07:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums