!HELP! How do I get a value from a form field

  • Thread starter Thread starter KayC
  • Start date Start date
K

KayC

On Access2002 I have a form in datasheet view. One of the columns is
text up to 255 characters. I want to pass this value to a string when
a user clicks on the field: Any ideas? Tried using on Gotfocus but
gives me a debug error with null
 
Kay,
I don't understand what you mean by...Please describe in detail what your trying to do when you "click" on a field with that
contains the text.
(assign it to a variable?, pass that value to another field?, pass that value to
another table?)

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Hi Al
Basically I have a sub form on datasheet view
When a user clicks on a particular field say (field_A) I would like
the contents of field A to show on the main form in a text box with
some other static data concatenated to it. When the user clicks to
another field in the sub form I want the text box in the main form to
be empty again.
Thanks
KayC
 
I think I would use the dblclick event instead of a single click, but its
your choice.

in the click event of Field_A,
me.parent!yourtextbox= me!field_A & your other data

then in the exit event of Field_A,
me.parent!yourtextbox =""

Damon
 
I think I would use the dblclick event instead of a single click, but its
your choice.

in the click event of Field_A,
me.parent!yourtextbox= me!field_A & your other data

then in the exit event of Field_A,
me.parent!yourtextbox =""

Damon






- Show quoted text -

Thanks Damon
I think the error was due to null fields. I had to use the nz
function which replaces nulls with zero strings
 
Back
Top