Results 1 to 1 of 1

Thread: SQL, VBA + dates :S (RESOLVED)

  1. #1

    Thread Starter
    Addicted Member Bazzlad's Avatar
    Join Date
    Jun 2003
    Posts
    227

    SQL, VBA + dates :S (RESOLVED)

    I have a table called tblproblem.
    In this table is a value called [date reported]

    I have a form called frmtest

    on this form is a textbox, text7 which is populated by a figure of 1 -12 (1 being january, 2 being feb etc)

    I want my SQL script to bring up all records made in july, or whatever month i choose.


    VB Code:
    1. SELECT *FROM tblproblem
    2. WHERE datepart(month, [date reported)] = datepart(month,'forms!frmtest!text7.value');


    Something like that. But that doesn't work.

    HELP!!!!

    Last edited by Bazzlad; Jul 24th, 2006 at 10:38 AM.
    *And you'll see, Everything you stand for is fake*
    http://www.rhesusrock.com

Posting Permissions

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



Click Here to Expand Forum to Full Width