I asked in post 2 if both forms were open. That code suggests neither was open.
I wouldn't expect it to output even once for a form that wasn't open.
I asked in post 2 if both forms were open. That code suggests neither was open.
I wouldn't expect it to output even once for a form that wasn't open.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Ah, me dummy in assuming that OutputTo implies that form opens first in the process of "outputting". Notice in final code that each iteration shows "Open", "OutputToo" and "Close". Each instance of "Open" in loop configures form for the designated floor as taken from the global variable "strCurFloor". I tested that if "Open" and "Close" sequence done outside of loop that I get 4 copies each of the same 1st floor, which I expected given newly found wisdom from MicronI wouldn't expect it to output even once for a form that wasn't open.
Does post #17 answer post #15 question?
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
I'd rather that all OP's divulged that information. Don't know if I'd clue in or not since that's not my style. Those who have no clue about scope (lots of code is just copied) won't say because they don't know better. Those who do know should say but for some reason, don't. That just wastes time asking about the not so obvious.Then it negates questions on unused variables
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Great idea. I've always appreciated the conventions of prefixing objects and data types so identifying global variables as such will be a great help.prefix globals with a 'g' to identify them
Some really good points added to the OP regarding clear variable identification. Since I'm a big user of global variables, perhaps some of my past posts were lacking where I failed to clarify? As posted in #21, I'm adopting Welshgasman's suggestion.