Forms![formname] - question.

S

SpookiePower

I have a simple question thats about to drive me crazy.

I'm trying to get the content of a textbox to be displayed
on another form in a textbox, but I keep get this message
in the destination textbox #name?

What I have done is to make a form1 and form2 like you
can see on this picture -
http://www.activewebsite.dk/download/access2.jpg

The button on form1 opens form2 and in the textbox
on form2 in its control source I have written Forms![Form1]![Text0]
Can someone help me in this simple question ?
 
S

SpookiePower

Allen Browne said:
You forgot the = at the start of the Control Source.


Thanks alot. I have been searching the net for the answer, and
they did not mention anything about the =

I have another question :)

When I do the samething with a combobox on form 1
I get the index value (I think it is called) displayed on form 2,
and not the name of the items that I can choose from in the
combobox. How can this be ?
 
A

Allen Browne

To read the value in the 2nd column of Combo1 on Form1, use:
=Forms![Form1]![Combo1].Column(1)

Note that Column() is a zero-based property, i.e. the first column is zero,
the 2nd is 1, ...
 
S

SpookiePower

Allen Browne said:
To read the value in the 2nd column of Combo1 on Form1, use:
=Forms![Form1]![Combo1].Column(1)

Note that Column() is a zero-based property, i.e. the first column is zero, the 2nd is 1, ...

Thanks. That's excatly what I was looking for.

I thought that I had to use the .Text to get the name of the item.
It is what I get out of the guide.
http://www.lqnet.com/access/combobox.asp
 

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