Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / June 2004

Tip: Looking for answers? Try searching our database.

Date Selected query parameter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ED - 29 Jun 2004 21:39 GMT
I currently have an ODBC query that hits an Oracle database.  I want
to bring back records for a given month based on a job completion date
in the Oracle database.  I would like to have the user define what
date range that is, restricting to a month period.  I do not want to
have to have to develop a lookup table for month and year.  I was
wondering how I could use a calendar function or something similar to
populate the month and year in order to pass into my ODBC query.  In
other words I would need to select 6/1/2003 as the beginning date and
6/30/2003 as the end dae.  Any help would be great.

Thanks!!
Ernie
Galina - 30 Jun 2004 14:35 GMT
Ernie
1st method is to use MS Access query on a linked Oracle table. You can
have a field Month([job complete date)] with a criteria =[Enter month
number: ]
2nd method I think you describe in your message. I take it that ODBC
query is pass-through query, which contains Oracle SQL.
When I use a pass-through query, I modify it dynamically: create SQL
in code and assign it to the query:
CurrentDb.QueryDefs("CheckEnrolment").SQL = mySQL
If you follow this way, you will need a form to enter a month with a
button OK. When user enters month and clicks OK, a code generates
Oracle SQL with start and end dates of the month as criterias. You
will need 2 functions: to calculate start date of month and end date
of month.
Oracle Sql is assigned to the pass-through query. The report based on
this query is starte - from code.
There is possibly a combination of 2 methods: I heard today that
Oracle now can take MS Access SQL in pass-through queries. It this is
correct, you any way will need to generate MS Access SQL dynamically,
because I doubt that Oracle will be able to translate something like
Month([job complete date)]=[Enter month number: ].
Hope, it is of some help.
Galina
> I currently have an ODBC query that hits an Oracle database.  I want
> to bring back records for a given month based on a job completion date
[quoted text clipped - 8 lines]
> Thanks!!
> Ernie
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.