Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Change SQL to code, use variable to define WHERE

0 views
Skip to first unread message

JR

unread,
Oct 26, 2009, 8:59:02 AM10/26/09
to
I am looking for a way to take the SQL query

SELECT Timeslip.EmployeeID, Timeslip.Day, Timeslip.TaskName, Timeslip.Hours,
Timeslip.TaskType, Timeslip.Comments
FROM Timeslip
WHERE (((Timeslip.EmployeeID)="4.0363"));

and make the WHERE statement dependent on a (form or report) variable
selected from a list box or combo box

and get the resuting information to a report if not already in a report.

Can that be done?

Thanks.

JR

Douglas J. Steele

unread,
Oct 26, 2009, 9:07:39 AM10/26/09
to
Already answered in another newsgroup to which you posted the same question.

If you feel you need to post to more than one group (HINT: it's seldom
necessary), please have the courtesy to cross-post (send the one message to
all groups at once), rather than multi-post (send individual messages to
each group). In this way, all responses to your post will be available
together, regardless of what group the responder was in, and the rest of us
won't have to read your post multiple times. (It also uses fewer server
resources)

If you're using Microsoft's web interface to post, you should see an
"Advanced Options" link at the bottom of the page. You can type the names of
the various groups into the Newsgroup box, separating each newsgroup name
with a semicolon.

Note that it's generally consider to be A Bad Thing to cross-post to more
than about 2 or 3 newsgroups.

(and no, I don't remember to which newsgroup I posted the response. See?
That's another one of the reasons why multi-posting is bad!)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"JR" <J...@discussions.microsoft.com> wrote in message
news:C0CE4ACA-28F7-4DFF...@microsoft.com...

JR

unread,
Oct 26, 2009, 1:34:01 PM10/26/09
to
Well, thanks for the tutorial on the ins and outs of how to use this
discussion group.

You might have skipped the "... please have the courtesy ..." and the snide
"... (and no, I don't remember to which newsgroup I posted the response. See?

That's another one of the reasons why multi-posting is bad!)

Never the less, I now know better...

By the way, your solution is only a partial solution it passes the value to
the filter, but the filter is never acted on -- Whoops! I said that in the
other location, but not this whole thing.

JR

"Douglas J. Steele" wrote:

> .
>

Douglas J. Steele

unread,
Oct 26, 2009, 7:37:26 PM10/26/09
to
Actually, you said nothing in the other location.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele

(no e-mails, please!)

"JR" <J...@discussions.microsoft.com> wrote in message

news:FA4C5860-1A53-407E...@microsoft.com...

deleo

unread,
Dec 2, 2009, 8:12:01 AM12/2/09
to
Hello,

I am researching a way to pull Timeslips (by Sage) data into Excel. I hope
my questions relate to this topic. Otherwise sorry.

When I check my available VBA libraries I only find a few select objects
seemingly related to Timeslips by Sage, and none of them seem to be at all
what I need. What I do need out of Timeslips is: employee hours by type and
date (seemingly just what JR is using). It seems from reading this post that
there is a VBA library available which would allow me to write VBA script in
an Excel module and pull Timeslips data into my workbook. Is this accurate?
If so, how do I obtain the needed libraries and documentation?

What I'd really like is to directly access a Timeslips report. But it seems
from DJS's comment that I would need to manually have Timeslips run the
report first (defeating the automation purpose). Or, can VBA code tell
Timeslips to run the report and then be used to grab the data from it?

TIA,
WD

Tom van Stiphout

unread,
Dec 2, 2009, 9:13:11 AM12/2/09
to
On Wed, 2 Dec 2009 05:12:01 -0800, deleo
<de...@discussions.microsoft.com> wrote:

Your message is a bit cryptic (no idea what/who JR and DJS are), but
the essential point is that you need to ask Sage for this
documentation. They will have an object model documented, or some
other way to get to the data. They will have sample programs to
peruse. That's just part of doing business for them, because if they
didn't their product wouldn't be as attractive. Some companies call
this an SDK = Software Development Kit.

-Tom.
Microsoft Access MVP

deleo

unread,
Dec 2, 2009, 10:26:01 AM12/2/09
to
sorry ... those are the initials of the two previous posters.

Thanks for directing me Tom. I am already pursuing Sage for such, the API
and the SDK (if they have them). Now I know what to expect.

WD

0 new messages