Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > SQL help
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 12 Topic 30463 of 31576
Post > Topic >>

SQL help

by troy_lee@[EMAIL PROTECTED] Jun 5, 2008 at 11:07 AM

I have two fields on a form. These two fields' values are based on an
expression and represent a date range. I need to create a SQL
statement that will use the returned values of these two fields in the
WHERE clause as a date range (less than or equal to, and greater than
or equal to the upper and lower dates of the range).

I then need to count the total number of records returned from the
query and output the record count to another text box on the same form
as the date range fields.

This seems like it should be easy but I am having problems and I can't
determine if it's my syntax for the query or if it's impossible to
call values from a text box directly for use in the WHERE clause.

Here is what I have played around with. I don't get an error when the
form runs. I just don't get a returned record count in my text box.

strTotal****ps = "SELECT RMAs.*, RMAs.[QAreviewed Date] " & _
                    "From RMAs " & _
                    "Where RMAs.[QAreviewed Date] Between Me!
[txtWk1BegDate] AND Me![txtWk1EndDate]'; "
    DoCmd.RunSQL strTotal****ps
    Me!txtWk1Total****ps = strTotal****ps

Thanks for the help in advance.

Troy Lee
 




 12 Posts in Topic:
SQL help
troy_lee@[EMAIL PROTECTED  2008-06-05 11:07:27 
Re: SQL help
Salad <oil@[EMAIL PROT  2008-06-05 11:50:14 
Re: SQL help
troy_lee@[EMAIL PROTECTED  2008-06-06 05:12:33 
Re: SQL help
troy_lee@[EMAIL PROTECTED  2008-06-06 06:12:55 
Re: SQL help
Salad <oil@[EMAIL PROT  2008-06-06 07:06:48 
Re: SQL help
troy_lee@[EMAIL PROTECTED  2008-06-06 10:07:55 
Re: SQL help
troy_lee@[EMAIL PROTECTED  2008-06-06 10:09:21 
Re: SQL help
troy_lee@[EMAIL PROTECTED  2008-06-06 10:26:22 
Re: SQL help
Salad <oil@[EMAIL PROT  2008-06-06 11:01:09 
Re: SQL help
troy_lee@[EMAIL PROTECTED  2008-06-06 11:10:38 
Re: SQL help
troy_lee@[EMAIL PROTECTED  2008-06-06 11:23:31 
Re: SQL help
Salad <oil@[EMAIL PROT  2008-06-06 13:51:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 23:00:37 CST 2008.