value from subform onto main form

  • Thread starter Jean-Paul De Winter
  • Start date
J

Jean-Paul De Winter

Hi,

I have a subform on a main form daiplaying a lis of names.
When I click on one I would like to get it into an entryfield on the main
form.

Code like:

Me!entryfieldname=me!listboxname

doesn't seem to work
I think I must use a different syntax

can somebody please explain how it must be done?
Thanks
JP
 
G

Geof Wyght

Jean-Paul,
Essayez:
Me.entryfieldname=me.controls("subformname").form.controls
("listboxname")
Geof.
 
G

Geof Wyght

To be really strict, that should be:
Me.entryfieldname.value=me.controls
("subformname").form.controls("listboxname").column(n)
where n is the column number 0, 1, 2, ... of the listbox.
Also, I would recommend the dot (.) notation instead of
the bang (!) notation. With Intellisense, the dot
notation will expose the next level of methods &
propertires as you type your expresiion.
Geof.
 

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