Strange
In a query I use: ">=Date()-5" as criteria to show records from 5 days ago. The full query:
SELECT tblSales.SalesOrderID, tblSales.Customer, tblSales.Item, tblSales.[Payment Method], tblSales.FitDate, tblSales.FitTime, tblSales.FitDuration, tblSales.FitDone
FROM tblSales
WHERE (((tblSales.FitDate)>=Date()-5) AND ((tblSales.FitDone)=False))
ORDER BY tblSales.FitDate;
In the runtime version of one pc I get the following error, but other pc's on runtime are ok:
Query Criteria ( In Runtime )
-
- SilverLounger
- Posts: 1728
- Joined: 25 Jan 2010, 08:34
- Location: Stoke on Trent - Staffordshire - England
Query Criteria ( In Runtime )
You do not have the required permissions to view the files attached to this post.
Cheers ...
Dave.
Dave.
-
- Administrator
- Posts: 78656
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Query Criteria ( In Runtime )
It looks like one of the libraries used by the database is missing or not in the expected place on the 'problem' PC.
You can inspect the libraries used in the Visual Basic Editor, by selecting Tools | References...
Do you use non-standard libraries?
You can inspect the libraries used in the Visual Basic Editor, by selecting Tools | References...
Do you use non-standard libraries?
Best wishes,
Hans
Hans
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: Query Criteria ( In Runtime )
Hi Dave,
Some more info about it to add to Hans's comments...
See this KB article (http://support.microsoft.com/kb/194374) that describes the issue and presents a resolution.
A quick scan on the we also indicates that it is a reference issue in the VBA libraries.
Another links about it:
-- http://www.pcreview.co.uk/forums/funtio ... 55785.html
Some more info about it to add to Hans's comments...
See this KB article (http://support.microsoft.com/kb/194374) that describes the issue and presents a resolution.
A quick scan on the we also indicates that it is a reference issue in the VBA libraries.
Another links about it:
-- http://www.pcreview.co.uk/forums/funtio ... 55785.html
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- SilverLounger
- Posts: 1728
- Joined: 25 Jan 2010, 08:34
- Location: Stoke on Trent - Staffordshire - England
Re: Query Criteria ( In Runtime )
Cheers guys. Didn't have time to reply on Saturday. I gathered it was a reference issue, not being registered in older versions of Office.
I did resolve it this morning, changed the "Date()" to "Now()" and it works fine.
However I do try to steer away from Now() because of the time element tagged to the end.
But, for this ourpose it is fixed.
Thanks again Guys.
I did resolve it this morning, changed the "Date()" to "Now()" and it works fine.
However I do try to steer away from Now() because of the time element tagged to the end.
But, for this ourpose it is fixed.
Thanks again Guys.
Cheers ...
Dave.
Dave.
-
- Administrator
- Posts: 78656
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Query Criteria ( In Runtime )
It's good that you found a workaround, but be alert for the same or a similar problem popping up - missing references can cause weird problems.
Best wishes,
Hans
Hans