Value different during debug mode

  • Thread starter Thread starter Bob Day
  • Start date Start date
B

Bob Day

Consider the two code snippets below.

a) During development, if you hold your cursor over AKA.SomeDateTime in
Snippet 2, it will indicate a value of #1/1/1950# as expected.

b) If you run the code in debug mode (i.e. F5), and at the stop, hold
your cursor over AKA.SomeDateTime in Snippet 2, it will indicate a value of
Nothing.



Why is it indicating a value of nothing? Any ideas what is going on?



Thanks

Bob



Code snippet 1:

Friend Structure AKA

Friend Const SomeDateTime As DateTime = #1/1/1950#

End Structure ' AKA



Code snippet 2:

Stop

If Now.Date = AKA.SomeDateTime Then

Stop

End If
 
Just a shot in the dark here but you could try changing your Friend
declarations to Public.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top