Results 1 to 4 of 4
  1. #1
    elios115 is offline Novice
    Windows 7 Access 2003
    Join Date
    Jul 2008
    Posts
    5

    db recordset query help

    can anybody help me with the code of this:



    Set el = db.OpenRecordset("select * from transfertable where jobID = " & Form_job.jobid And deliverytick = true, dbOpenDynaset, dbSeeChanges)

    kindly correct it for me because it is giving "type mismatch error"

    please note that deliverytick is a yes/no check box with true/false defaults


    the purpose of this is to choose the recordsets from the database where 2 criterias match (jobID = " & Form_job.jobid and deliverytick is checked on the form therefore its value in table is true)

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Try
    Code:
    Set el = db.OpenRecordset("SELECT * FROM transfertable WHERE jobID = " & Form_job.jobid & " AND deliverytick = TRUE", dbOpenDynaset, dbSeeChanges)
    Note: there is a quote after TRUE

  3. #3
    elios115 is offline Novice
    Windows 7 Access 2003
    Join Date
    Jul 2008
    Posts
    5
    exactly right!!

    thank you for your help

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You're welcome.

    Ready to mark this solved?

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

Similar Threads

  1. recordset open error on SQL query
    By Siuxia in forum Programming
    Replies: 5
    Last Post: 05-30-2012, 08:02 AM
  2. Replies: 2
    Last Post: 03-08-2012, 12:59 PM
  3. Update Query?? or RecordSet??
    By bbrazeau in forum Queries
    Replies: 2
    Last Post: 01-13-2012, 08:44 AM
  4. Replies: 1
    Last Post: 11-13-2009, 03:03 AM
  5. Add new Recordset using Recorset by Query
    By gailoni in forum Programming
    Replies: 1
    Last Post: 10-22-2008, 11:52 PM

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