469,167 Members | 2,072 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,167 developers. It's quick & easy.

VB in Access Problem (I think)

Ok, so I posted a question about an overflow error before. Now I realize its not just there.

Here's the situation, you really don't need the code because well I don't actually think its the code. I have a class called CStream, in there it has some variables (H, P, T, W) all as doubles with get and let procedures. In the H get, there is an if statement that checks to see if H is set, if not set, calculate via P and T, then return H otherwise just return H. so in the module, I set H = a value, and then later I am accessing the H via a get (either via a print or calculation). NOW here is the issue. If I just run the program, I get the a calculated H (which is not what I want) if I step through the program (this is spooky) and get to the Get H procedure and stop just as it enters the get h, I mouse over the H and guess what it says... H = 0 (not set).... I keep running and it calculates etc. If I step through and stop at the same spot, still says H=0, I open up the locals window in the Debugger and look at the H value... it has the value I set it to... mouse over H again and it say H= value! now... WHY is that?????
Jun 1 '07 #1
2 888
Dököll
2,364 Expert 2GB
I open up the locals window in the Debugger and look at the H value... it has the value I set it to... mouse over H again and it say H= value! now... WHY is that?????
Great job looking at the locals window through the debugger, it is your friend:-)

How do you dimension H? String, Integer!
Jun 1 '07 #2
all doubles as stated before. but to put it quite simply, access vba is acting like a little kid. if you aren't watching it (debugger locals window) it messes with you. It seriously forgets that H has any value and YES I am absolutely sure it is set, until you look at it in the debugger locals... then it says "oh yeah, stupid me, it has a value of 175, not 0".... How can I fix this, because its driving me nuts and I need this program to work.
Jun 3 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

63 posts views Thread by Jerome | last post: by
13 posts views Thread by Simon Bailey | last post: by
49 posts views Thread by Yannick Turgeon | last post: by
17 posts views Thread by Mell via AccessMonster.com | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.