Sql Query not going with form fields

  • Thread starter Thread starter beat
  • Start date Start date
B

beat

Hi,

does anyone know why my query is not returning any records?

I am new to the access project and have converted the DB do a CS
application.

In a list box I have a query which filters on form fields but this does not
seem to work.

Suspect that the syntax is not correct or it is not possible to run this
sort of query in the 2003 version?

Any ideas would be appreciated.

Query:

SELECT DISTINCT
VorgangModulLeistung.Modul,
VorgangModulLeistung.Leistung
FROM ForeCast_Angebot_Auftrag

Where ForeCast_Angebot_Auftrag.Kunde =
[Formulare]![Vorgang]![KundeHLP])



Where as the [Formulare]![Vorgang]![KundeHLP]) is a field in my active form.


Regards Beat
FlexReport AG
www.flexreport.ch
 
You are right, this syntaxe is not OK for an ADP project. In ADP, all your
queries run on SQL-Server and by definition, this server knows nothing about
the values of local parameters/controls in ADP running on the client side.
For transmitting parameters, you can either dynamically build your query
string or use the InputParameters property.

Take a look at the previous discussions in this forum and in particular,
search on Google for InputParameters:

http://groups.google.ca/group/micro...r/search?q=InputParameters&start=0&scoring=d&
 
Hi Sylvain,
Thanks a lot for your quick reply!
Just realized how much work it would be to convert all the filters and
queries to ADO or SP in SQL.
Guess will go for linked table instead this will certainly work for up to 10
people and save me time to convert the application.


Regards Beat





Sylvain Lafontaine said:
You are right, this syntaxe is not OK for an ADP project. In ADP, all
your queries run on SQL-Server and by definition, this server knows
nothing about the values of local parameters/controls in ADP running on
the client side. For transmitting parameters, you can either dynamically
build your query string or use the InputParameters property.

Take a look at the previous discussions in this forum and in particular,
search on Google for InputParameters:

http://groups.google.ca/group/micro...r/search?q=InputParameters&start=0&scoring=d&

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


beat said:
Hi,

does anyone know why my query is not returning any records?

I am new to the access project and have converted the DB do a CS
application.

In a list box I have a query which filters on form fields but this does
not seem to work.

Suspect that the syntax is not correct or it is not possible to run this
sort of query in the 2003 version?

Any ideas would be appreciated.

Query:

SELECT DISTINCT
VorgangModulLeistung.Modul,
VorgangModulLeistung.Leistung
FROM ForeCast_Angebot_Auftrag

Where ForeCast_Angebot_Auftrag.Kunde =
[Formulare]![Vorgang]![KundeHLP])



Where as the [Formulare]![Vorgang]![KundeHLP]) is a field in my active
form.


Regards Beat
FlexReport AG
www.flexreport.ch
 
Back
Top