Re: Reference form control for a query
- From: "zz" <hamidrjafari@xxxxxxxxx>
- Date: 17 Oct 2006 17:54:46 -0700
Thanks Douglas
It worked.
Douglas J. Steele wrote:
Write a function that returns the value you need, and refer to the function,
not the control.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
<hamidrjafari@xxxxxxxxx> wrote in message
news:1160664247.422910.31890@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi
I know it is easy to reference value of a control on a form in a query.
For example we could use this expression in the WHERE clause of a
simple SQL SELECT query:
[forms]![myLoadedForm]![control]
But i have a problem. It only works for simple 'native' controls such
as textboxes, comboboxes, etc and not for complex ones such as
treeviews and listviews. Actually the thing I want to reference is the
selected item in the treeview and I have used a veriaty of formats:
[forms]![myLoadedForm]![tvw].selectedItem
[forms]![myLoadedForm]![objTvw].selectedItem -- that I had in the
form's load event: set objTvw = tvw.object
...
What should I do?
And also why it is needed to have such statement : set objTvw =
tvw.object?
thnx
hamid
.
- References:
- Reference form control for a query
- From: hamidrjafari
- Re: Reference form control for a query
- From: Douglas J. Steele
- Reference form control for a query
- Prev by Date: Re: Control the value of one field based on date in another field
- Next by Date: Re: Automatic Form Completion
- Previous by thread: Re: Reference form control for a query
- Next by thread: Microsoft Access
- Index(es):
Relevant Pages
|