Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing contents from a textbox to a variable

Status
Not open for further replies.
Aug 26, 2002
33
US
Does anyone know how to do this?
I am trying this:

strSQL = txtTemp

but it keeps returning a null value, for both the textbox and strSQL. When I comment this out and run the code, I can see that the textbox IS NOT null and has the data I need in it, so what gives???
 
try this:

strSQL = me!txtTemp


also, this must be done from vba...

junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
Hi!

Where is this code? If it is in the BeforeUpdate for the text box then the value will not be recognized yet since it has not been saved. In that case try using Me!txtTemp.Text.

If you are using any form event that occurrs after the record has changed such as Current then the value will not be availble then either.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top