Re: Need to display results of Stored Proceedure with Criteria



Do you want to display a form or a report?

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF


"Groucho" <Groucho@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8679A632-3B94-4644-930C-90577FC45982@xxxxxxxxxxxxxxxx
I am open to using either a stored proceedure or an inline function to be
able to do this. I have looked trough all 12 pages in this section and it
starts to talk about what I need and then it goes off on a tangent to
where I
get lost.

My query that I need to run is much more involved, but the one below will
still be able to show what I want to do and an answer on how it should be
done would be easily moved to the more complex query.

SELECT Employee, WorkDate, Customer, WorkHours
FROM dbo.tblWorkDetail
WHERE (DATEPART(Month, WorkDate) = @Pick_Month)

I want to either have a field on a form that will set the criteria or just
have an input box open that would ask for the month.

My problem lies in that I can create the function or SP but when other
users
try and use it, the systems says that the object cannot be found. I gave
all
uses full permission on the SQL object so that isn't it, but when I look
at
the SP in SQL it looks like this:

CREATE PROCEDURE [domainname\myname].StoredProcedure1(@Pick_Month
nvarchar(50))
AS SELECT Employee, WorkDate, Customer, WorkHours
FROM dbo.tblWorkDetail
WHERE (DATEPART(Month, WorkDate) = @Pick_Month)
GO

and I think it is because of the domainname\myname that I am having the
issue.

Is there a way to open this like a query window that all can use?

I have tried with connection objects, I have tried making tables that do
not
show up until you refresh the table list for some reason, etc. I am at
wits
end for something that was so simple with an mdb.....


.



Relevant Pages

  • Re: Need to display results of Stored Proceedure with Criteria
    ... Sylvain Lafontaine, ing. ... My query that I need to run is much more involved, ... WHERE (DATEPART(Month, WorkDate) = @Pick_Month) ... uses full permission on the SQL object so that isn't it, ...
    (microsoft.public.access.adp.sqlserver)
  • Re: main form - subform
    ... thanks so much for still helping - I put the exact code you had in the SQL ... INSERT INTO TimeCardMDJEFF ([WORKDATE]) ... This is code have in query in SQL view: ...
    (microsoft.public.access.forms)
  • Re: Query A Table For The "latest workdate".
    ... The data is in the correct format and I did ... I have a 4th field column - Employee. ... You can use a normalizing union query to get the data into the correct form ... and then use that query to get the latest workdate for each project. ...
    (microsoft.public.access.queries)
  • Re: Query A Table For The "latest workdate".
    ... TaskDate - Contains the date relevant to the taskType. ... You can use a normalizing union query to get the data into the correct form ... and then use that query to get the latest workdate for each project. ... SELECT Project, "Task 1" as TaskName, Task1 as TaskDate ...
    (microsoft.public.access.queries)
  • Re: Group by date on employeeID
    ... If that's accurate, one approach would be to use a Totals query, grouping by ... selection criterion for a "Where" selection in the aggregation field of the ... query design view under the [workDate] field: ... each employee in a query that returns one value per employeeID. ...
    (microsoft.public.access.queries)

Loading