Full Version: Pass a variable to a text box
UtterAccess Forums > Microsoft® Access > Access Forms
tmort
I'd like to be able to view an an SQL string from code in a form for troubleshooting purposes.
tried putting forms.formname.textboxname = strSQL but got an error.
I'm not sure if this is because I put it in the wrong place if I am not doing it right.
Oknow you can do it as I've done it before. I just don't recall how.
Thanks
HiTechCoach
Where are you placing this code?

Try the format:

forms!formname.textboxname = strSQL


To sent the data to the VBA immediate window use:

Debug.print strSQL
Edited by: HiTechCoach on Thu Aug 16 12:06:10 EDT 2007.
Larry Larsen
Hi
Or:
CODE

MsgBox strSQL

thumbup.gif
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.