Results 1 to 4 of 4
  1. #1
    lena is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2014
    Posts
    3

    the correct writing..

    rstImage.Open "SELECT * FROM Image WHERE SystemNo = ' " & SystemNoUnit & " ' " AND time >= '" + Ttime + " ' ", ConCX, adOpenForwardOnly





    can anyone Help me .. how is the correct writing .
    any suggestions?

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Assuming SystemNoUnit is text type field and Time is a date/time type field, try:

    "SELECT * FROM Image WHERE SystemNo = '" & SystemNoUnit & "' AND time >= #" & Ttime & "#", ConCX, adOpenForwardOnly
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    lena is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2014
    Posts
    3
    Thanks June7 for your attention.... but i still get error

    Ttime = 2013-11-28 10:01:34

    the error --> '10' ????????

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Is Time field a text or date/time type?

    Is Ttime an unbound textbox or a variable? The Ttime value is not in standard date/time format - should be: mm/dd/yyyy hh:mm:ss

    Don't understand the error - what is the full error message?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 5
    Last Post: 09-12-2014, 06:41 AM
  2. How do I transfer or writing of this
    By azhar2006 in forum Reports
    Replies: 7
    Last Post: 07-27-2014, 01:55 PM
  3. Email Writing
    By drunkenneo in forum Programming
    Replies: 3
    Last Post: 07-09-2013, 07:30 AM
  4. Replies: 4
    Last Post: 03-05-2012, 10:20 AM
  5. Replies: 9
    Last Post: 06-26-2011, 09:14 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