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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

ACCESS doesn't like the brackets



 
 
Thread Tools Display Modes
  #1  
Old September 7th, 2006, 03:36 PM posted to microsoft.public.access.queries
Nishant Shah
external usenet poster
 
Posts: 5
Default ACCESS doesn't like the brackets

[Posting on behalf of the customer as shes not able to access this site.]

What's wrong with my statement?
ACCESS doesn't like the brackets - even when I remove the brackets before
and after the "!" ? Please help..
=[Forms]![IssuesSearch]![OpenedDate1] And [OpenedDate][Forms]![IssuesSearch]![OpenedDate2]+1


Tammy Jones
UPS Supply Chain Solutions
  #2  
Old September 7th, 2006, 03:53 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default ACCESS doesn't like the brackets

It is not a matter of you brackets. You are creating a wrong formula like
this --
= 2/1/2006 And 3/4/2006 4/5/2006 +1


= 2/1/2006 And 3/4/2006

It can not be greater than a date and equal to another at the same time.

3/4/2006 4/5/2006 +1
You can not have criteria like this.

=[Forms]![IssuesSearch]![OpenedDate1] And [OpenedDate][Forms]![IssuesSearch]![OpenedDate2]+1


Tammy Jones
UPS Supply Chain Solutions

  #3  
Old September 7th, 2006, 05:20 PM posted to microsoft.public.access.queries
Nishant Shah
external usenet poster
 
Posts: 5
Default ACCESS doesn't like the brackets

[Posting on behalf of the customer as shes not able to access this site.]

I'm creating a form where a user can search for opened items between two
dates, two date fields. And in the Parameters portion of the query I've got:

Forms!IssuesSearch!OpenedDate1 DATETIME
Forms!IssuesSearch!OpenedDate2 DATETIME

And I was told by one of your experts to type the following in the criteria
of the query:
=[Forms]![IssuesSearch]![OpenedDate1] And [OpenedDate][Forms]![IssuesSearch]![OpenedDate2]+1



Tammy Jones
UPS Supply Chain Solutions
  #4  
Old September 7th, 2006, 07:07 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default ACCESS doesn't like the brackets

I do not profess to be an expert, just a self-taught amature. The plus one
on the end is because many use Now() to fill in dates but it also contains
the time. If you just use the date as criteria it is as of midnight (no time
component) and will not pull records entered with time after midnight.

You can just use this as the criteria --
Between [Forms]![IssuesSearch]![OpenedDate1] And
[Forms]![IssuesSearch]![OpenedDate2]+1

If you still have problems then post your query SQL by opening in design
view, click on menu VIEW - SQL View. Hightlight, copy, and paste in a post
for someone to take a look at it.

"Nishant Shah" wrote:

[Posting on behalf of the customer as shes not able to access this site.]

I'm creating a form where a user can search for opened items between two
dates, two date fields. And in the Parameters portion of the query I've got:

Forms!IssuesSearch!OpenedDate1 DATETIME
Forms!IssuesSearch!OpenedDate2 DATETIME

And I was told by one of your experts to type the following in the criteria
of the query:
=[Forms]![IssuesSearch]![OpenedDate1] And [OpenedDate][Forms]![IssuesSearch]![OpenedDate2]+1



Tammy Jones
UPS Supply Chain Solutions

 




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:06 AM.


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