A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date filter



 
 
Thread Tools Display Modes
  #11  
Old August 24th, 2009, 10:26 AM posted to microsoft.public.access.gettingstarted
Chris75 via AccessMonster.com
external usenet poster
 
Posts: 32
Default Date filter

Thanks. One thing. I inputed your criteria and I get an invalid syntax
error.

Select * from tblSchedule Where DateField Between Forms!Schedule![BeginDate]
And Forms!Schedule![EndDate];

What is missing from the above? The fields and table names are the same.

Arvin Meyer [MVP] wrote:
As long as you can edit the query, you will be able to edit the form.
Hi Arvin,

[quoted text clipped - 18 lines]

Chris


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200908/1

  #12  
Old August 24th, 2009, 12:44 PM posted to microsoft.public.access.gettingstarted
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default Date filter

Is the Schedule table name tblSchedule? How about the date field in the
table, is it named DateField?
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Chris75 via AccessMonster.com" u54211@uwe wrote in message
news:9b1172be6ffad@uwe...
Thanks. One thing. I inputed your criteria and I get an invalid syntax
error.

Select * from tblSchedule Where DateField Between
Forms!Schedule![BeginDate]
And Forms!Schedule![EndDate];

What is missing from the above? The fields and table names are the same.

Arvin Meyer [MVP] wrote:
As long as you can edit the query, you will be able to edit the form.
Hi Arvin,

[quoted text clipped - 18 lines]

Chris


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200908/1



  #13  
Old August 24th, 2009, 06:21 PM posted to microsoft.public.access.gettingstarted
Chris75 via AccessMonster.com
external usenet poster
 
Posts: 32
Default Date filter

The table name is jsut Schedule. The date field is just Date.

Arvin Meyer [MVP] wrote:
Is the Schedule table name tblSchedule? How about the date field in the
table, is it named DateField?
Thanks. One thing. I inputed your criteria and I get an invalid syntax
error.

[quoted text clipped - 11 lines]

Chris


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200908/1

  #14  
Old August 24th, 2009, 06:55 PM posted to microsoft.public.access.gettingstarted
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Date filter

Consider renaming your field. Date is a reserved word, and should never be
used as a field name.

For a comprehensive list of names to avoid (as well as a link to a free
utility to check your application for compliance), see what Allen Browne has
at http://www.allenbrowne.com/Ap****ueBadWord.html

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Chris75 via AccessMonster.com" u54211@uwe wrote in message
news:9b1597b3da583@uwe...
The table name is jsut Schedule. The date field is just Date.

Arvin Meyer [MVP] wrote:
Is the Schedule table name tblSchedule? How about the date field in the
table, is it named DateField?
Thanks. One thing. I inputed your criteria and I get an invalid syntax
error.

[quoted text clipped - 11 lines]

Chris


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200908/1



  #15  
Old August 24th, 2009, 07:13 PM posted to microsoft.public.access.gettingstarted
Chris75 via AccessMonster.com
external usenet poster
 
Posts: 32
Default Date filter

Hi Douglas,

I had just finished reading one of your other posts regarding this. I will
change the field name and seet what it gives me.

Question:

Would it work best if you could actually see what I was talking about rather
than me describing it?

Douglas J. Steele wrote:
Consider renaming your field. Date is a reserved word, and should never be
used as a field name.

For a comprehensive list of names to avoid (as well as a link to a free
utility to check your application for compliance), see what Allen Browne has
at http://www.allenbrowne.com/Ap****ueBadWord.html

The table name is jsut Schedule. The date field is just Date.

[quoted text clipped - 5 lines]

Chris


--
Message posted via http://www.accessmonster.com

  #16  
Old August 24th, 2009, 07:29 PM posted to microsoft.public.access.gettingstarted
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Date filter

If by "see what I was talking about" you mean you want to post a copy of
your database, the answer is no. Binary attachments are not desirable.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Chris75 via AccessMonster.com" u54211@uwe wrote in message
news:9b160d65268ce@uwe...
Hi Douglas,

I had just finished reading one of your other posts regarding this. I
will
change the field name and seet what it gives me.

Question:

Would it work best if you could actually see what I was talking about
rather
than me describing it?

Douglas J. Steele wrote:
Consider renaming your field. Date is a reserved word, and should never be
used as a field name.

For a comprehensive list of names to avoid (as well as a link to a free
utility to check your application for compliance), see what Allen Browne
has
at http://www.allenbrowne.com/Ap****ueBadWord.html

The table name is jsut Schedule. The date field is just Date.

[quoted text clipped - 5 lines]

Chris


--
Message posted via http://www.accessmonster.com



  #17  
Old August 25th, 2009, 10:32 AM posted to microsoft.public.access.gettingstarted
Chris75 via AccessMonster.com
external usenet poster
 
Posts: 32
Default Date filter

Images included?

Douglas J. Steele wrote:
If by "see what I was talking about" you mean you want to post a copy of
your database, the answer is no. Binary attachments are not desirable.

Hi Douglas,

[quoted text clipped - 21 lines]

Chris


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200908/1

  #18  
Old August 25th, 2009, 01:29 PM posted to microsoft.public.access.gettingstarted
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Date filter

Images, being binary, are discouraged as well.

You're posting through AccessMonster, which may not have such rules, but all
AccessMonster is doing is interacting with an NNTP newsgroup. NNTP
newsgroups discourage binary attachments (unless the newsgroup's name
includes "binary" in it)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Chris75 via AccessMonster.com" u54211@uwe wrote in message
news:9b1e127eb5e7b@uwe...
Images included?

Douglas J. Steele wrote:
If by "see what I was talking about" you mean you want to post a copy of
your database, the answer is no. Binary attachments are not desirable.

Hi Douglas,

[quoted text clipped - 21 lines]

Chris


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200908/1



  #19  
Old August 27th, 2009, 01:20 AM posted to microsoft.public.access.gettingstarted
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default Date filter

Just go into SQL view and copy the text and paste it in a news message. Most
of us can read SQL directly, we may see your problem.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Chris75 via AccessMonster.com" u54211@uwe wrote in message
news:9b160d65268ce@uwe...
Hi Douglas,

I had just finished reading one of your other posts regarding this. I
will
change the field name and seet what it gives me.

Question:

Would it work best if you could actually see what I was talking about
rather
than me describing it?

Douglas J. Steele wrote:
Consider renaming your field. Date is a reserved word, and should never be
used as a field name.

For a comprehensive list of names to avoid (as well as a link to a free
utility to check your application for compliance), see what Allen Browne
has
at http://www.allenbrowne.com/Ap****ueBadWord.html

The table name is jsut Schedule. The date field is just Date.

[quoted text clipped - 5 lines]

Chris


--
Message posted via http://www.accessmonster.com



  #20  
Old August 27th, 2009, 02:05 AM posted to microsoft.public.access.gettingstarted
AccessVandal via AccessMonster.com
external usenet poster
 
Posts: 461
Default Date filter

Since your form is bound to the table, why not just use the Form's filter?

Create a button near the textboxes..something like

Private Sub YourCommandButtonName_Click()
Me.Filter = "SomeDate Between " & Me.StartDate & " AND " & Me.EndDate
Me.FitlerOn = True
End Sub

Not sure of the ocotorp/hash thingy, if don't work try

"EndDate Between #" & Me.StartDate & "# AND #" & Me.EndDate & "#"

Chris75 wrote:
Hello,

I've gone through various articles and posts to try to figure this out...with
no success. I am using Access 2007.

Okay. I have a form, with the requisite unbound text boxes for Begin Date
and End Date (BeginDate and EndDate). What I obviously want to do is filter
my records based on those 2 controls. Here's where I am unclear. I have
read about the WHERE query and the sFilter Code. Do I do both or one or
should I just write a macro filter, which is something I have not done at all?

My form is called Schedule.

Thanks for your help.

Chris


--
Please Rate the posting if helps you.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/200908/1

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:07 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.