Run param query by macro: value should be set according to control on form

  • Thread starter Thread starter Gina Meyer
  • Start date Start date
G

Gina Meyer

Hello to all.

Having the above problem, I tried various ways for the correct syntax but
ended always up being asked to type in the value for my query manually:

Right now the following criteria is set in the query called on button click:

[Forms]![Kunden].[frm_Fahrzeug].[frm_Arbeit].[frm_WorkDetails]![txtWorkID]

other varieties were:
[Forms]![Kunden]![frm_Fahrzeug]![frm_Arbeit]![frm_WorkDetails]![txtWorkID]
[Forms]![frm_WorkDetails]![txtWorkID]

the control [txtWorkID], that does contain the actual value, is based on
frm_WorkDetails

according to that value a query is executed and the records exported to
excel.

when pressing the button I am only asked to type in the parameters for the
query - only then it works.
On earlier tries Access told me that it couldn't find the txtWorkID

I understand that a subform is part of its main container and obviously not
visible then ??
what is the correct syntax for the criteria in the query ?? How can I solve
my problem ??

please could anybody help me with some advice ??

Thanks in advance !!

Gina
 
Back
Top