problem with passing caption to query

  • Thread starter Thread starter Annelies
  • Start date Start date
A

Annelies

The following query does not work :'(

SELECT E_Hulp_Zorg_Verlener.Voornaam
FROM E_Hulp_Zorg_Verlener, E_Overleg, R_Deelnemer_In
WHERE (((E_Overleg.ID)=[Forms]![PatientenIngeven]![Bijschrift92] And
(E_Overleg.ID)=[R_Deelnemer_In].[Overleg_ID]) AND
((E_Hulp_Zorg_Verlener.ID)=[R_Deelnemer_In].[Hulp_Zorg_ID]));

[Forms]![PatientenIngeven]![Bijschrift92](Bijschrift means Caption)
<-- this is the problem.
When i pass the parameter manually, the query works fine. Can anybody
tell me what the problem might be..

Greetzzz
Liezzzje..
 
Is:

[Forms]![PatientenIngeven]![Bijschrift92]

text or a number? If text, you need to place quotation
marks around it.

Also, use SQL-92 INNER JOINS in the FROM clause instead of
creating the joins in the WHERE clause. Unless of course
you're using Oracle (blech).

David Atkins, MCP
 
*feel really dumb*

Sorry you don't need quotes when passing by reference.

How long have I been doing this?

David
 
If I can take you literally and assume that [Bijschrift92]
is a label control, then you need to specify the caption
property to return the caption of the label control.

Specifically:

[Forms]![PatientenIngeven]![Bijschrift92].Caption

I'm afraid otherwise I can't find your problem.

David Atkins, MCP
 
Also, use SQL-92 INNER JOINS in the FROM clause instead of
creating the joins in the WHERE clause.


Followed your advice, but that doesn't solve the problem of course..
Any other suggestions?

Liezzzje..
 
No, I didn't expect using inner joins would solve the
problem. What it does is help the query optimizer choose
the most efficient plan for your query (read up on hash
joins, merge joins, and the like).

Is your control a label control? What type of control is
it?

David
 
Back
Top