February 9, 2012 at 12:58 pm
I have created a pass through query in access as
execute spfiscalsocialstatsnotsatorholidays forms!f_main!txtbegindate, forms!f_main!txtenddate
an error is created when i try to put this query (qrySocialSaturdays) into a different query that a report will be based on. the error is
odbc--call failed.
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '!'.(#102)
I have text boxes on a form in MsAccess whose values need to be passed to the above stored procedure.
February 9, 2012 at 1:10 pm
does " execute spfiscalsocialstatsnotsatorholidays forms!f_main!txtbegindate, forms!f_main!txtenddate" run successfully when executed from a command on Form "f_main" ?
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
February 9, 2012 at 1:17 pm
no it gives the identical same error as described above.
February 9, 2012 at 1:23 pm
can you provide the SQL for your query
I am no Access expert, I think that you are having problems relating to Form!
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
February 9, 2012 at 1:29 pm
the pass through query in access is execute spfiscalsocialstatsnotsatorholidays forms!f_main!txtbegindate, forms!f_main!txtenddate
this is to open the stored procedure in sql server whose code is
ALTER procedure [dbo].[spFiscalSocialStatsNotSatOrHolidays]
@startdate date,
@enddate date
as
select member_number from member_time where time_out >'4:30 PM' and
member_time.date >= @startdate and member_time.date <= @enddate
group by member_number
order by member_number
February 9, 2012 at 2:23 pm
this thread may give you some more ideas
http://stackoverflow.com/questions/4937933/ms-access-pass-through-dependent-on-form-value
hope it helps and good luck
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply