A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IF statement concatenation



 
 
Thread Tools Display Modes
  #11  
Old September 18th, 2009, 05:51 PM posted to microsoft.public.access.forms
Kipp Woodard
external usenet poster
 
Posts: 50
Default IF statement concatenation

To verify the values in your collection, use the Watch window.

When you are stopped in the code... Select the entire name of the collection
and hit Shift-F9. This will give you a little dialog and you can click the
Add button to add a watch for your collection variable. Then, in the Watch
window, you can inspect the values in your collection.

You can probably accomplish the same with the Locals window, which is
similar to the Watch window, but it autmatcially has all local variables in
it.

"gmazza via AccessMonster.com" wrote:

I did as you suggested and when I debugged, my statement:
If VisitNo = cVisitFlags(VisitNo) Then
blah
The VisitNo is 1 and I know that cVisitFlags1 is also 1, yet it went passed
the If and onto the else.
When I put the mouse over VisitNo, it says 1 while debugging. When I put the
mouse over cVisitFlags, nothing shows up at all.

Kipp Woodard wrote:
If you hade your 5 visit flags in a collection, then you would be able to say:

If VisitNo = cVisitFlags (VisitNo) Then
blah blah

This depends on VisitNo always having a value that is a valid index for the
collection (1-5).

It would work similarly with an array, as Douglas suggested.

its close, but I don't need a collection. Here is exactly what I am trying to
do.

[quoted text clipped - 70 lines]
I keep getting a type mismatch. Anyone see where I went wrong?
Thanks for your help!


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200909/1


  #12  
Old September 18th, 2009, 10:04 PM posted to microsoft.public.access.forms
gmazza via AccessMonster.com
external usenet poster
 
Posts: 177
Default IF statement concatenation

Ya I tried the debugging watch but the value of cVisitFlags(VisitNo) hasn't
changed.

Kipp Woodard wrote:
To verify the values in your collection, use the Watch window.

When you are stopped in the code... Select the entire name of the collection
and hit Shift-F9. This will give you a little dialog and you can click the
Add button to add a watch for your collection variable. Then, in the Watch
window, you can inspect the values in your collection.

You can probably accomplish the same with the Locals window, which is
similar to the Watch window, but it autmatcially has all local variables in
it.

I did as you suggested and when I debugged, my statement:
If VisitNo = cVisitFlags(VisitNo) Then

[quoted text clipped - 19 lines]
I keep getting a type mismatch. Anyone see where I went wrong?
Thanks for your help!


--
Message posted via http://www.accessmonster.com

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:52 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.