Code in SQL-Query with form field...

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
 
V

Vsn

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
 
J

jokobe

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top