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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Immediate Window 2

Status
Not open for further replies.

tech12345

Technical User
Nov 6, 2002
8
GB
This is probably a basic question, but I see a lot of code examples using Debug.print to copy some information to the Immediate Window
eg
Debug.Print Formname
Debug.Print (strMsgPrompt)

I can see the value of this for checking small amounts of information, but what about larger amounts.

I know you can use extra code to populate fields (for example) but It is used such a lot in code as simply Debug.Print. I wondered if there was a way of using the information straight from the Immediate Window itself, which I haven’t caught on to yet.

Any observations/suggestions would be gratefully received
 
You can interrogate a field, property; etc. by just typing a question mark and the field/object name:

?rs.fields("MY_FIELD")

?con.Provider

and hitting enter.

This is a good technique to use if you need to look at a long string or something, and don't want to put print statements in your code.

You can also set properties on the fly, which is handy sometimes.

Tranman
 
Also great for long sql strings, which you can then cut/paste into the query builder's sql window.
 
Thanks for the help, Its confirmed that my understanding was on the right lines. I suppose the name Immediate is very appropriate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top