
Signature
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
> Hello, I'm new to .ADP. I am able to write a parameter query as record
> souce
[quoted text clipped - 7 lines]
>
> Thanks, Stuart
Thanks, this is very helpful. Can you explain a bit more about the stored
procedure? I am pretty familiar with the logic in your first example where
you append the field to the query in code. In fact, that's how I've been
doing it to avoid this parameterization issue.
A related question, perhaps best illustrated by an example. Suppose I have
three tables:
tblProjects: ProjectID, ProjectName
tblStaff: StaffID, StaffName
tblAssignments: ProjectID, StaffID
I would like the user to enter a staffID, and then have the form display all
the projects to which this staff member is NOT assigned. I know how to write
such a query in the jet world (I would do a query of a query). But the
parameterization issue seems to muddy the whole thing up. Any suggestions?
And a final question, can you suggest an on-line resource for help with
Access/SQL? I haven't been able to find anything.
Thanks, Stuart
> When using parameters, the rules are a little different between a record
> source and a control. You can use the InputParameters property to transmit
[quoted text clipped - 27 lines]
> >
> > Thanks, Stuart
Sylvain Lafontaine - 29 May 2008 17:23 GMT
For the question about stored procedures (SP), I was under the impression
that you already knew about it because you were able to make a parameter
query. There are two ways of doing a parameter query - one by using a SP
and the second by using the placement holder @[Forms]![MyForms]![MyControl]
(and ? in the InputParameters) but the second one is rarely used in an ADP
project.
The preferred method is to use a SP because this is the most powerful way of
extracting a resultset (recordset) from a SQL-Server. If you want to know
about SP, you should consult a good book on SQL-Server and T-SQL (the
language used on SQL-Server).
For your second question, I don't know what you mean exactly with the
expression « a query of a query » but the answer to your question would
probably be to use the NOT EXISTS or the NOT IN statements. A Left Outer
Join could also be used but this is a little more complicated to understand.
Grosso modo, it should be the same on SQL-Server than with JET. I don't see
why the parameterization issue here would or could muddy the whole thing up.
Finally, to my knowledge, there is no on-line resource help for issues about
Access and SQL-Server other than using Google or the newsgroups.

Signature
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
> Thanks, this is very helpful. Can you explain a bit more about the stored
> procedure? I am pretty familiar with the logic in your first example
[quoted text clipped - 62 lines]
>> >
>> > Thanks, Stuart