Code in SQL-Query with form field...

  • Thread starter Thread starter jokobe
  • Start date Start date
J

jokobe

I try to open a form.
The recordsource contains this code:
t_hefte.gesamt_kuerzel="lsf100"
When I try to it with a form field like this, it is not working:

t_hefte.gesamt_kuerzel =
[forms]![a_t_kunde_t_studiengang_klausur]![txtklausurswitch]

also the field is filled with the value "lsf100"

Any helpfull hint

jokobe
 
You are quit unclear.........but I do think if you edit your second phrase
code to the following you might be more succesfull.

t_hefte.gesamt_kuerzel =
Forms![form_a_t_kunde_t_studiengang_klausur]![txtklausurswitch]

providing..........
you have a form called: a_t_kunde_t_studiengang_klausur (????)
and........
that form has a control called: txtklausurswitch
besides.........
the object or control t_hefte.gesamt_kuerzel has to excist.

For easier reading and understandable code, use naming of objects etc. of
the code convensions for Access (http://www.acc-technology.com/namconv.htm)
and keep names short and meaningfull.

Success.
Ludovic
 
thanks for you answer....it is working...

jokobe

b.t.w: I changed my naming habits according to the standards, but this old
code ....

Vsn said:
You are quit unclear.........but I do think if you edit your second phrase
code to the following you might be more succesfull.

t_hefte.gesamt_kuerzel =
Forms![form_a_t_kunde_t_studiengang_klausur]![txtklausurswitch]

providing..........
you have a form called: a_t_kunde_t_studiengang_klausur (????)
and........
that form has a control called: txtklausurswitch
besides.........
the object or control t_hefte.gesamt_kuerzel has to excist.

For easier reading and understandable code, use naming of objects etc. of
the code convensions for Access (http://www.acc-technology.com/namconv.htm)
and keep names short and meaningfull.

Success.
Ludovic


jokobe said:
I try to open a form.
The recordsource contains this code:
t_hefte.gesamt_kuerzel="lsf100"
When I try to it with a form field like this, it is not working:

t_hefte.gesamt_kuerzel =
[forms]![a_t_kunde_t_studiengang_klausur]![txtklausurswitch]

also the field is filled with the value "lsf100"

Any helpfull hint

jokobe
 
Back
Top