By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,257 Members | 925 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,257 IT Pros & Developers. It's quick & easy.

Best way to tell if X is between two values? A97

P: n/a
MLH
225 If 1 <= MyCount <= 4 Then GString = "a few days ago. "
230 If 5 <= MyCount <= 10 Then GString = "a week or so ago. "
235 If 11 <= MyCount <= 17 Then GString = "about 2 weeks ago. "
240 If 18 <= MyCount <= 24 Then GString = "about 3 weeks ago. "
245 If 25 <= MyCount <= 30 Then GString = "about a month ago. "

The above lines do not do what I expected. What's the best way
to do what I'm trying to do. If you're confused by the above syntax,
then don't bother - its old stuff.
Nov 21 '05 #1
Share this Question
Share on Google+
46 Replies


P: n/a
MLH
225 If 1 <= MyCount And MyCount <= 4 Then GString = "blan"
230 If 5 <= MyCount And MyCount <= 10 Then GString = "blah "
235 If 11 <= MyCount And MyCount <= 17 Then GString = "blah"
240 If 18 <= MyCount And MyCount <= 24 Then GString = "blah"

I know about the above syntax, OK. I just wondered if there was
another way similar to the old-style shorthand approach in the OP?
Nov 21 '05 #2

P: n/a
Might be a bit long winded to type in all the cases but -

Select Case MyCount
Case
.....
End Select

or perhaps with the between operator

Select Case MyCount
Case MyCount Between 1 and 4
GString = "a few days ago"
Case MyCount Between 5 And 10
GString = "a week or so ago"
.....
End Select
--
Nick Coe (UK)
http://www.alphacos.co.uk/ AccHelp + pAnimal
http://www.pjandcoe.co.uk/ Online Store
http://www.mrcomputersltd.com/ Repairs Upgrades

In news:09********************************@4ax.com,
MLH typed:
225 If 1 <= MyCount <= 4 Then GString = "a few days
ago. "
230 If 5 <= MyCount <= 10 Then GString = "a week or so
ago. " 235 If 11 <= MyCount <= 17 Then GString =
"about 2
weeks ago. " 240 If 18 <= MyCount <= 24 Then GString =
"about 3 weeks ago. " 245 If 25 <= MyCount <= 30 Then
GString = "about a month ago. "

The above lines do not do what I expected. What's the best
way
to do what I'm trying to do. If you're confused by the
above
syntax, then don't bother - its old stuff.

Nov 21 '05 #3

P: n/a

"Nick Coe (UK)" <cl*****************@MASPON.yahooDOTcom> wrote in message
news:43**********************@ptn-nntp-reader02.plus.net...
Might be a bit long winded to type in all the cases but -

Select Case MyCount
Case
....
End Select

or perhaps with the between operator

Select Case MyCount
Case MyCount Between 1 and 4
GString = "a few days ago"
Case MyCount Between 5 And 10
GString = "a week or so ago"
....
End Select
--
Nick Coe (UK)


Select Case is the ideal solution for this, but use the To operator.

Select Case MyCount
Case 1 To 4 : GS....
Case 5 To 10: GS...
etc
End Select

One reason for choosing Case over the original posted code is efficiency.
It will only evaluate until a match is found then exit the Case statement.
With the earlier posted code, the series of IF...Then statements, all would
get evaluated, even if the first one hit.

Randy

Nov 21 '05 #4

P: n/a
The Switch function would be another way of doing this. The Select Case
method is probably easier to write but it's worthwhile looking at the Switch
function in the Help file and being aware of what it does.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!

"MLH" <CR**@NorthState.net> wrote in message
news:09********************************@4ax.com...
225 If 1 <= MyCount <= 4 Then GString = "a few days ago. "
230 If 5 <= MyCount <= 10 Then GString = "a week or so ago. "
235 If 11 <= MyCount <= 17 Then GString = "about 2 weeks ago. "
240 If 18 <= MyCount <= 24 Then GString = "about 3 weeks ago. "
245 If 25 <= MyCount <= 30 Then GString = "about a month ago. "

The above lines do not do what I expected. What's the best way
to do what I'm trying to do. If you're confused by the above syntax,
then don't bother - its old stuff.

Nov 21 '05 #5

P: n/a
steve, time to go back to school. The OP request dealt with ranges of
values, Switch deals with discrete values.

As Nick and Randy have mentioned, the solution is Select Case...

John... Visio MVP
"PC Datasheet" <no****@nospam.spam> wrote in message
news:NQ****************@newsread2.news.atl.earthli nk.net...
The Switch function would be another way of doing this. The Select Case
method is probably easier to write but it's worthwhile looking at the
Switch function in the Help file and being aware of what it does.

PC Datasheet
"MLH" <CR**@NorthState.net> wrote in message
news:09********************************@4ax.com...
225 If 1 <= MyCount <= 4 Then GString = "a few days ago. "
230 If 5 <= MyCount <= 10 Then GString = "a week or so ago. "
235 If 11 <= MyCount <= 17 Then GString = "about 2 weeks ago. "
240 If 18 <= MyCount <= 24 Then GString = "about 3 weeks ago. "
245 If 25 <= MyCount <= 30 Then GString = "about a month ago. "

Nov 21 '05 #6

P: n/a
MLH wrote:
225 If 1 <= MyCount <= 4 Then GString = "a few days ago. "
230 If 5 <= MyCount <= 10 Then GString = "a week or so ago. "
235 If 11 <= MyCount <= 17 Then GString = "about 2 weeks ago. "
240 If 18 <= MyCount <= 24 Then GString = "about 3 weeks ago. "
245 If 25 <= MyCount <= 30 Then GString = "about a month ago. "

The above lines do not do what I expected. What's the best way
to do what I'm trying to do. If you're confused by the above syntax,
then don't bother - its old stuff.


With your syntax the confusting thing is the <= and <=. Usually one
expects >= and <= to get a range.
Nov 21 '05 #7

P: n/a

"PC Datasheet" <no****@nospam.spam> wrote in message
news:NQ****************@newsread2.news.atl.earthli nk.net...
The Switch function would be another way of doing this. The Select Case
method is probably easier to write but it's worthwhile looking at the Switch function in the Help file and being aware of what it does.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com


A quick note to anyone reading this message thread. This newsgroup is an
excellent resource for getting help with your Access projects. If you feel
the need, however, to seek professional help, I strongly advise that you not
consider hiring this PC Datasheet character. Steve is a bright kid but is
totally unprofessional. There are literally hundreds of competent Access
consultants available. Many post regularly in this newsgroup, others can
easily be located by googling or visiting guru.com.

Nov 21 '05 #8

P: n/a

"PC Datasheet" <no****@nospam.spam> schreef in bericht news:NQ****************@newsread2.news.atl.earthli nk.net...

<snipped 'not very good' answer ...>
If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
But NONE of these 1000 users come to your aid here ... ???
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!


Need wrong answers? Contact Steve!
Need to hire a lame coward? Contact Steve!
Need a person with absolutely NO ethics? Contact Steve!

Arno R
Nov 21 '05 #9

P: n/a
REPEATEDLY the dimmest of the dimwits shows his ignorance and stupidity!!!

Dim MyCount As Integer
Dim MyVariant As Variant
MyCount = 8
MyVariant = Switch(MyCount >= 1 And MyCount <= 4, "a few days ago. ", _
MyCount >= 5 And MyCount <= 10, "a week or so ago. ")
MsgBox MyVariant

Run this code and see what you get!!!

Why don't you ask Randy Harris if the Switch function can deal with a range
of values.

John Marshall dwt (sic dimwit) argues with posters about what they say in
their posts, argues that he didn't say what is a direct quote of a post he
made, displays his ignorance and stupidity by his statement just made and
makes no contributory posts to the newsgroups. He wants you to think he is
the champion of the newsgroups by this kind of action!!! He does nothing but
give good MVPs a bad name!!!

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!



"John Marshall, MVP" <la******@stonehenge.ca> wrote in message
news:4p********************@magma.ca...
steve, time to go back to school. The OP request dealt with ranges of
values, Switch deals with discrete values.

As Nick and Randy have mentioned, the solution is Select Case...

John... Visio MVP
"PC Datasheet" <no****@nospam.spam> wrote in message
news:NQ****************@newsread2.news.atl.earthli nk.net...
The Switch function would be another way of doing this. The Select Case
method is probably easier to write but it's worthwhile looking at the
Switch function in the Help file and being aware of what it does.

PC Datasheet
"MLH" <CR**@NorthState.net> wrote in message
news:09********************************@4ax.com...
225 If 1 <= MyCount <= 4 Then GString = "a few days ago. "
230 If 5 <= MyCount <= 10 Then GString = "a week or so ago. "
235 If 11 <= MyCount <= 17 Then GString = "about 2 weeks ago. "
240 If 18 <= MyCount <= 24 Then GString = "about 3 weeks ago. "
245 If 25 <= MyCount <= 30 Then GString = "about a month ago. "


Nov 21 '05 #10

P: n/a
Yes, Salad is correct. If what is posted is just meant to illustrate the
question then fine. Otherwise the If statements need to be written like:
If MyCount >= 1 And MyCount <= 4 Then GString = "a few days ago. "

You don't show a Dim statement but presumably MyCount is dimmed as an
Integer. However, if MyCount is dimmed as Single and can have a fractional
part such as 4.5, then your code is flawed because you don't account for the
this possibility. Your code does not account for values between 4 and 5.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!


"Salad" <oi*@vinegar.com> wrote in message
news:wm****************@newsread3.news.pas.earthli nk.net...
MLH wrote:
225 If 1 <= MyCount <= 4 Then GString = "a few days ago. "
230 If 5 <= MyCount <= 10 Then GString = "a week or so ago. "
235 If 11 <= MyCount <= 17 Then GString = "about 2 weeks ago. "
240 If 18 <= MyCount <= 24 Then GString = "about 3 weeks ago. "
245 If 25 <= MyCount <= 30 Then GString = "about a month ago. "

The above lines do not do what I expected. What's the best way
to do what I'm trying to do. If you're confused by the above syntax,
then don't bother - its old stuff.


With your syntax the confusting thing is the <= and <=. Usually one
expects >= and <= to get a range.

Nov 21 '05 #11

P: n/a
PC Datasheet <no****@nospam.spam> wrote:
MsgBox MyVariant

Run this code and see what you get!!!


Moreover, Switch() evaluates all of its arguments - a great
feature in more advanced apps!!
--
Paul
Nov 21 '05 #12

P: n/a

"PC Datasheet" <no****@nospam.spam> wrote in message
news:Jy***************@newsread3.news.atl.earthlin k.net...
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com


A quick note to anyone reading this message thread. This newsgroup is an
excellent resource for getting help with your Access projects. If you feel
the need, however, to seek professional help, I strongly advise that you not
consider hiring this PC Datasheet character. Steve is a bright kid but is
totally unprofessional. There are literally hundreds of competent Access
consultants available. Many post regularly in this newsgroup, others can
easily be located by googling or visiting guru.com.

Nov 21 '05 #13

P: n/a

"PC Datasheet" <no****@nospam.spam> schreef in bericht news:Jy***************@newsread3.news.atl.earthlin k.net...
Yes, Salad is correct. If what is posted is just meant to illustrate the
question then fine. Otherwise the If statements need to be written like:
If MyCount >= 1 And MyCount <= 4 Then GString = "a few days ago. "
Thanks, we did *not* know that... Great contribution, thanks!
But IMO Select Case is still the preferred method here as Randy and Nick wrote hours ago ...
You don't show a Dim statement but presumably MyCount is dimmed as an
Integer. However, if MyCount is dimmed as Single and can have a fractional
part such as 4.5, then your code is flawed because you don't account for the
this possibility. Your code does not account for values between 4 and 5.


Who asked for this lecture?
You are only talking bullshit again, bla bla bla bla bla bla bla bla
The Code does not account for *various* values ...
Probably this code does not need to, because MLH is still 'counting the days' I guess?

Again a pseudo answer *only* posted to 'drop' your advertising here.

<snipped all the bla bla bla bla bla bla bla bla bla advertising>

Arno R
Nov 21 '05 #14

P: n/a
I'll partially concede that to you, but the Select Case evalutes what is
necessary, Switch evaluates all.

Unlike the Select Case which has an ELSE clause, all conditions in a Switch
must be addressed.

For coding readabilty, the Select is easier to read.

Select Case MyCount
Case 1 To 4: GString = "a few days ago. "
Case 5 To 10: GString = "a week or so ago. "
Case 11 To 17: GString = "about 2 weeks ago. "
Case 18 To 24: GString = "about 3 weeks ago. "
Case 25 To 30: GString = "about month ago. "
Case Else: GString = " "
End Select

GString = Switch(MyCount >= 1 And MyCount <= 4, "a few days ago. ",
_
MyCount >= 5 And MyCount <= 10, "a week or so ago. ", _
MyCount >= 11 And MyCount <= 17, "about 2 weeks ago. ", _
MyCount >= 18 And MyCount <= 24, "about 3 weeks ago. ", _
MyCount >= 25 And MyCount <= 30, "about month ago. ", _
MyCount > 30, " ", MyCount < 1, " ")

So when should we expect the flood of apologies and answers that you owe
this newsgroup?

John... Visio MVP
Nov 21 '05 #15

P: n/a
What do you mean "partially concede"? Are you arguing that you don't get the
whole result?

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!


"John Marshall, MVP" <la******@stonehenge.ca> wrote in message
news:Ns******************************@magma.ca...
I'll partially concede that to you, but the Select Case evalutes what is
necessary, Switch evaluates all.

Unlike the Select Case which has an ELSE clause, all conditions in a
Switch must be addressed.

For coding readabilty, the Select is easier to read.

Select Case MyCount
Case 1 To 4: GString = "a few days ago. "
Case 5 To 10: GString = "a week or so ago. "
Case 11 To 17: GString = "about 2 weeks ago. "
Case 18 To 24: GString = "about 3 weeks ago. "
Case 25 To 30: GString = "about month ago. "
Case Else: GString = " "
End Select

GString = Switch(MyCount >= 1 And MyCount <= 4, "a few days ago. ",
_
MyCount >= 5 And MyCount <= 10, "a week or so ago. ", _
MyCount >= 11 And MyCount <= 17, "about 2 weeks ago. ", _
MyCount >= 18 And MyCount <= 24, "about 3 weeks ago. ", _
MyCount >= 25 And MyCount <= 30, "about month ago. ", _
MyCount > 30, " ", MyCount < 1, " ")

So when should we expect the flood of apologies and answers that you owe
this newsgroup?

John... Visio MVP

Nov 23 '05 #16

P: n/a

"PC Datasheet" <no****@nospam.spam> schreef in bericht news:EX***************@newsread3.news.atl.earthlin k.net...

<snipped the nonsense>

<snipped the advertising>

What's left ??

Arno R
Nov 23 '05 #17

P: n/a
By the way ----

--
Nick Coe (UK)
http://www.alphacos.co.uk/ AccHelp + pAnimal
http://www.pjandcoe.co.uk/ Online Store
http://www.mrcomputersltd.com/ Repairs Upgrades

Go to the first URL and it says "I am available for hire short term, long
term or one off fixed price job to develop, design, support ......" He does
not work for free!! Why aren't you harassing him???

Go to the second URL and it's about selling T-Shirts with pictures of dogs
on them. That has nothing to do with Access!!! Why aren't you harassing
him???

Go to the third URL and it says "Call or EMail Today For A Competitive
Quotation" (for PCs, Laptops, etc)
That's pure advertising!!! Why aren't you harassing him???

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!


"StopThisAdvertising" <StopThisAdvertising@DataShit> wrote in message
news:43********************@dreader2.news.tiscali. nl...

"PC Datasheet" <no****@nospam.spam> schreef in bericht
news:Jy***************@newsread3.news.atl.earthlin k.net...
Yes, Salad is correct. If what is posted is just meant to illustrate the
question then fine. Otherwise the If statements need to be written like:
If MyCount >= 1 And MyCount <= 4 Then GString = "a few days ago. "
Thanks, we did *not* know that... Great contribution, thanks!
But IMO Select Case is still the preferred method here as Randy and Nick
wrote hours ago ...
You don't show a Dim statement but presumably MyCount is dimmed as an
Integer. However, if MyCount is dimmed as Single and can have a fractional
part such as 4.5, then your code is flawed because you don't account for
the
this possibility. Your code does not account for values between 4 and 5.


Who asked for this lecture?
You are only talking bullshit again, bla bla bla bla bla bla bla bla
The Code does not account for *various* values ...
Probably this code does not need to, because MLH is still 'counting the
days' I guess?

Again a pseudo answer *only* posted to 'drop' your advertising here.

<snipped all the bla bla bla bla bla bla bla bla bla advertising>

Arno R
Nov 23 '05 #18

P: n/a
I tried various values of MyCount and your code died. I still do not see any
reason to recommend Switch over Select Case.

So I guess since you used this oppurtunity as another chance to solicit, you
have no intention of apologizing or answering any of the outstanding
questions put to you.

John... Visio MVP

"PC Datasheet" <no****@nospam.spam> wrote in message
news:EX***************@newsread3.news.atl.earthlin k.net...
What do you mean "partially concede"? Are you arguing that you don't get
the whole result?

"John Marshall, MVP" <la******@stonehenge.ca> wrote in message
news:Ns******************************@magma.ca...
I'll partially concede that to you, but the Select Case evalutes what is
necessary, Switch evaluates all.

Unlike the Select Case which has an ELSE clause, all conditions in a
Switch must be addressed.

For coding readabilty, the Select is easier to read.

Select Case MyCount
Case 1 To 4: GString = "a few days ago. "
Case 5 To 10: GString = "a week or so ago. "
Case 11 To 17: GString = "about 2 weeks ago. "
Case 18 To 24: GString = "about 3 weeks ago. "
Case 25 To 30: GString = "about month ago. "
Case Else: GString = " "
End Select

GString = Switch(MyCount >= 1 And MyCount <= 4, "a few days ago.
", _
MyCount >= 5 And MyCount <= 10, "a week or so ago. ", _
MyCount >= 11 And MyCount <= 17, "about 2 weeks ago. ", _
MyCount >= 18 And MyCount <= 24, "about 3 weeks ago. ", _
MyCount >= 25 And MyCount <= 30, "about month ago. ", _
MyCount > 30, " ", MyCount < 1, " ")

So when should we expect the flood of apologies and answers that you owe
this newsgroup?

John... Visio MVP

Nov 23 '05 #19

P: n/a
Simple, those are webpages that you have to go to see the that. The webpage
also gives more insight into who you are dealing with.

Yes, it is pure advertising, but it is NOT in this newsgroup.

He only adds three short lines, yours is eight long winded lines.

Of course, the big reason is that he actually has useful information BEFORE
his signature.

So there is no reason to harrass him.

John... Visio MVP
"PC Datasheet" <no****@nospam.spam> wrote in message
news:e7*****************@newsread1.news.atl.earthl ink.net...
By the way ----

Nick Coe (UK)
http://www.alphacos.co.uk/ AccHelp + pAnimal
http://www.pjandcoe.co.uk/ Online Store
http://www.mrcomputersltd.com/ Repairs Upgrades

Go to the first URL and it says "I am available for hire short term, long
term or one off fixed price job to develop, design, support ......" He
does not work for free!! Why aren't you harassing him???

Go to the second URL and it's about selling T-Shirts with pictures of dogs
on them. That has nothing to do with Access!!! Why aren't you harassing
him???

Go to the third URL and it says "Call or EMail Today For A Competitive
Quotation" (for PCs, Laptops, etc)
That's pure advertising!!! Why aren't you harassing him???


Nov 23 '05 #20

P: n/a

"PC Datasheet" <no****@nospam.spam> wrote in message
news:e7*****************@newsread1.news.atl.earthl ink.net...
By the way ----

--
Nick Coe (UK)
http://www.alphacos.co.uk/ AccHelp + pAnimal
http://www.pjandcoe.co.uk/ Online Store
http://www.mrcomputersltd.com/ Repairs Upgrades

Go to the first URL and it says "I am available for hire short term, long
term or one off fixed price job to develop, design, support ......" He does not work for free!! Why aren't you harassing him???

Go to the second URL and it's about selling T-Shirts with pictures of dogs
on them. That has nothing to do with Access!!! Why aren't you harassing
him???


Surely you can't really believe that is the same as what you have been
doing. There are many consultants that regularly post in this newsgroup,
you're the only what that posts adverstising. You don't see Nick, or other
professionals, like Albert Kallal, Allen Browne or David Fenton advertising
here. They all seem to be doing quite well as consultants. Can you really
believe that repeatedly violating the CDMA charter and engaging in all of
this controversy is going to help your business?

Drop the advertising and return to only a link to your web site in your sig.
Nov 23 '05 #21

P: n/a
You're the dimmest of the dimmest dimwits. It's hard to believe that anyone
could be as stupid as you. First you say it works and now you say it doesn't
work. It's just like everything you have been posting - it's all a big
fabrication (oops, sorry! you will have to get someone to explain what that
big-ggg word means!). Over and over you show your ignorance and stupidity!!!
If you look at the code you will see that MyCount has to be an integer and
it has to be between 1 and 10. Sure it will crash outside those
parameters!!! You're so stupid that you tried it but then again I forgot
that you (and your mama) can't read. The constraints of those parameters is
exactly what my other post is about where your dimwitted protoge condemned
me for posting. And now his dimwitted underling stumbles over it. Why don't
you go to Keith W the third member of the dimwiteers and have him explain it
to you. It's just unbelievable how stupid you are !!!!!!!!!!!!!!!!!!!!!!

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!



"John Marshall, MVP" <la******@stonehenge.ca> wrote in message
news:HZ********************@magma.ca...
I tried various values of MyCount and your code died. I still do not see
any reason to recommend Switch over Select Case.

So I guess since you used this oppurtunity as another chance to solicit,
you have no intention of apologizing or answering any of the outstanding
questions put to you.

John... Visio MVP

"PC Datasheet" <no****@nospam.spam> wrote in message
news:EX***************@newsread3.news.atl.earthlin k.net...
What do you mean "partially concede"? Are you arguing that you don't get
the whole result?

"John Marshall, MVP" <la******@stonehenge.ca> wrote in message
news:Ns******************************@magma.ca...
I'll partially concede that to you, but the Select Case evalutes what is
necessary, Switch evaluates all.

Unlike the Select Case which has an ELSE clause, all conditions in a
Switch must be addressed.

For coding readabilty, the Select is easier to read.

Select Case MyCount
Case 1 To 4: GString = "a few days ago. "
Case 5 To 10: GString = "a week or so ago. "
Case 11 To 17: GString = "about 2 weeks ago. "
Case 18 To 24: GString = "about 3 weeks ago. "
Case 25 To 30: GString = "about month ago. "
Case Else: GString = " "
End Select

GString = Switch(MyCount >= 1 And MyCount <= 4, "a few days ago.
", _
MyCount >= 5 And MyCount <= 10, "a week or so ago. ", _
MyCount >= 11 And MyCount <= 17, "about 2 weeks ago. ", _
MyCount >= 18 And MyCount <= 24, "about 3 weeks ago. ", _
MyCount >= 25 And MyCount <= 30, "about month ago. ", _
MyCount > 30, " ", MyCount < 1, " ")

So when should we expect the flood of apologies and answers that you owe
this newsgroup?

John... Visio MVP


Nov 23 '05 #22

P: n/a
Once again your stupidity shines like a bright star!!!
Where do you think I got his URL for selling T-Shirts with dogs pictures on
them. Read my lips -- right out of CDMA!! You admit that it is pure
advertising and yet you say it is okay. I'm offering fee-based help with
Access to anyone who needs it. So why it is okay for him to sell T-shirts
with dog pictures in them in the newsgroup and you have been condemning me
for offering help with Access? Your idiotic harassment started over my
saying Contact me if you would like my help. That's one short sentence.
You're saying that it is okay to use three lines to advertise T-Shirts with
dog pictures on them in the newsgroup but it's not okay to offer help with
Access in one short sentence.

Here is my original post in this thread --
The Switch function would be another way of doing this. The Select Case
method is probably easier to write but it's worthwhile looking at the Switch
function in the Help file and being aware of what it does.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!

You admitted that the switch function would work so logically don't you
think I actually have useful information before my signature? So now you are
saying there was nothing wrong with my post because I gave useful
information first. Thank you very much!!!! So now there is no reason to
harass me!!!

"John Marshall, MVP" <la******@stonehenge.ca> wrote in message
news:2f********************@magma.ca...
Simple, those are webpages that you have to go to see the that. The
webpage also gives more insight into who you are dealing with.

Yes, it is pure advertising, but it is NOT in this newsgroup.

He only adds three short lines, yours is eight long winded lines.

Of course, the big reason is that he actually has useful information
BEFORE his signature.

So there is no reason to harrass him.

John... Visio MVP
"PC Datasheet" <no****@nospam.spam> wrote in message
news:e7*****************@newsread1.news.atl.earthl ink.net...
By the way ----

Nick Coe (UK)
http://www.alphacos.co.uk/ AccHelp + pAnimal
http://www.pjandcoe.co.uk/ Online Store
http://www.mrcomputersltd.com/ Repairs Upgrades

Go to the first URL and it says "I am available for hire short term, long
term or one off fixed price job to develop, design, support ......" He
does not work for free!! Why aren't you harassing him???

Go to the second URL and it's about selling T-Shirts with pictures of
dogs on them. That has nothing to do with Access!!! Why aren't you
harassing him???

Go to the third URL and it says "Call or EMail Today For A Competitive
Quotation" (for PCs, Laptops, etc)
That's pure advertising!!! Why aren't you harassing him???


Nov 23 '05 #23

P: n/a
StopThisAdvertising wrote:
"PC Datasheet" <no****@nospam.spam> schreef in bericht news:Jy***************@newsread3.news.atl.earthlin k.net...

Yes, Salad is correct. If what is posted is just meant to illustrate the
question then fine. Otherwise the If statements need to be written like:
If MyCount >= 1 And MyCount <= 4 Then GString = "a few days ago. "

Thanks, we did *not* know that... Great contribution, thanks!
But IMO Select Case is still the preferred method here as Randy and Nick wrote hours ago ...

Yes. I would use Select Case. I was simply noting the < < stuff.

But your sarcasm meter is so high I'd almost think I'm in a girly-boy
catfight.

The only person I have an issue with is/has been the moron with the
hard-on for David F. His posts have made this place a pisshole in the
past. Your catfight with Datasheet just adds to the BS in this place.

If you have anything to contribute to the group, contribute. Your war
with Datasheet is simply pissing and moaning in the wind for the sake of
nothing. Grow up and get a life.
Nov 23 '05 #24

P: n/a
As a reminder to all who reads this, this is the same person who admitted to
deliberately lieing in a post yesterday.

To Randy --
So you are implying it is okay to advertise T-Shirts with dogs pictures on
them in the newsgroup but it's not okay to offer help with Access in the
newsgroup???

And as far as what I see or don't see in the newsgroups, how about this --
Nick Coe (UK)
Available - Will work for money :-)
http://www.alphacos.co.uk/ AccHelp + pAnimal fee based help, consulting
http://www.pjandcoe.co.uk/ Online Store (t-shirts and animal toys)

This is only one example out of many not just by Nick!!!

Finally, as far as my business, people in these newsgroups see through all
the worthless garbage Arno R, John Marshall, Keith Wilby and now you are
polluting the newsgroups with. They're disgusted with the likes of all of
you. I am now approaching 1050 Access users who have requested fee-based
help from me. I am seeing more and more of these people by-passing the
newsgroups and coming straight to me because of the unprofessional
atmosphere that has been created by Arno R and his band of dimwiteers. Lyle
Fairfield not too long ago posted that he was seeing a decline in
participation. Everyone who is supporting and promoting Arno R and his
dimwiteers is contributing to the decline. You're seeing the same effect
"The Troll" had on the newsgroups some time ago. If you want to see this
downhill slide continue keep supporting anf promoting Arno R, John Marshall
and Keith Wilby.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!



"Randy Harris" <ra***@SpamFree.com> wrote in message
news:vz****************@newssvr22.news.prodigy.net ...

"PC Datasheet" <no****@nospam.spam> wrote in message
news:e7*****************@newsread1.news.atl.earthl ink.net...
By the way ----

--
Nick Coe (UK)
http://www.alphacos.co.uk/ AccHelp + pAnimal
http://www.pjandcoe.co.uk/ Online Store
http://www.mrcomputersltd.com/ Repairs Upgrades

Go to the first URL and it says "I am available for hire short term, long
term or one off fixed price job to develop, design, support ......" He

does
not work for free!! Why aren't you harassing him???

Go to the second URL and it's about selling T-Shirts with pictures of
dogs
on them. That has nothing to do with Access!!! Why aren't you harassing
him???


Surely you can't really believe that is the same as what you have been
doing. There are many consultants that regularly post in this newsgroup,
you're the only what that posts adverstising. You don't see Nick, or
other
professionals, like Albert Kallal, Allen Browne or David Fenton
advertising
here. They all seem to be doing quite well as consultants. Can you really
believe that repeatedly violating the CDMA charter and engaging in all of
this controversy is going to help your business?

Drop the advertising and return to only a link to your web site in your
sig.

Nov 23 '05 #25

P: n/a
"PC Datasheet" <no****@nospam.spam> wrote in message
news:Zv***************@newsread3.news.atl.earthlin k.net...
You're the dimmest of the dimmest dimwits. It's hard to believe that
anyone could be as stupid as you. First you say it works and now you say
it doesn't work. It's just like everything you have been posting - it's
all a big fabrication (oops, sorry! you will have to get someone to
explain what that big-ggg word means!). Over and over you show your
ignorance and stupidity!!!
Excellent professional discussion. Definitely someone I should hire.
If you look at the code you will see that MyCount has to be an integer and
it has to be between 1 and 10. Sure it will crash outside those
parameters!!!
The original poster used 1 to 30, your code did not handle that. Any good
code should handle exceptions or is this an example of the "quality" of work
you get paid for?

You're so stupid that you tried it but then again I forgot that you (and your mama) can't read. The constraints of those parameters
is exactly what my other post is about where your dimwitted protoge
condemned me for posting. And now his dimwitted underling stumbles over
it. Why don't you go to Keith W the third member of the dimwiteers and
have him explain it to you. It's just unbelievable how stupid you are
!!!!!!!!!!!!!!!!!!!!!!
More exquisite prose.
PC Datasheet

Strange way of spelling steve.

John... Visio MVP
Nov 23 '05 #26

P: n/a
"PC Datasheet" <no****@nospam.spam> wrote in message
news:lN***************@newsread3.news.atl.earthlin k.net...
Once again your stupidity shines like a bright star!!!
Where do you think I got his URL for selling T-Shirts with dogs pictures
on them. Read my lips -- right out of CDMA!! You admit that it is pure
advertising and yet you say it is okay. I'm offering fee-based help with
Access to anyone who needs it. So why it is okay for him to sell T-shirts
with dog pictures in them in the newsgroup and you have been condemning me
for offering help with Access?
The advertising is not in CDMA, but on his webpage, yours is in CDMA. It was
your
choice to click on the URL. His message also contained content that was of
value to the
newsgroup, your "Contact me" did not.

-- more childish rants snipped.
PC Datasheet

Nov 23 '05 #27

P: n/a
"PC Datasheet" <no****@nospam.spam> wrote in message
news:lj*****************@newsread2.news.atl.earthl ink.net...
I am now approaching 1050 Access users who have requested fee-based help
from me. I am seeing more and more of these people by-passing the
newsgroups and coming straight to me because of the unprofessional
atmosphere that has been created by Arno R and his band of dimwiteers.


Interesting how being contacted by 1000 has now changed to contacted by 1050
who have requested fee-based help. Are you playing with the numbers? If you
do have 1050 paying customers, why do you need to solicit? No repeat
business? Why are they not flooding these newsgroups with testimonials?

As for unprofessional atmosphere, the childish insults and slurs have been
authored by you. When you actually do help, I have not against your message,
unless you were passing incorrect information (i.e. Adding I = I +1 to an
automatic loop). So I can not see my behaviour as being unprofessional.

John... Visio MVP
Nov 23 '05 #28

P: n/a
Randy,

Here's an example from another newsgroup of what Arno R and his band of
dimwiteers are causing ---

<Sorry about the multiple threads. I was so tied up trying to fix this and
then there was the message from PCDatasheet and StopThisAdvert.. and I was
afraid my original inquiry was lost so I reposted. >

Supporting and promoting Arno R and his band of dimwiteers is only cause
more and more of this kind of thing.

Steve

"PC Datasheet" <no****@nospam.spam> wrote in message
news:lj*****************@newsread2.news.atl.earthl ink.net...
As a reminder to all who reads this, this is the same person who admitted
to deliberately lieing in a post yesterday.

To Randy --
So you are implying it is okay to advertise T-Shirts with dogs pictures on
them in the newsgroup but it's not okay to offer help with Access in the
newsgroup???

And as far as what I see or don't see in the newsgroups, how about this --
Nick Coe (UK)
Available - Will work for money :-)
http://www.alphacos.co.uk/ AccHelp + pAnimal fee based help,
consulting
http://www.pjandcoe.co.uk/ Online Store (t-shirts and animal toys)

This is only one example out of many not just by Nick!!!

Finally, as far as my business, people in these newsgroups see through all
the worthless garbage Arno R, John Marshall, Keith Wilby and now you are
polluting the newsgroups with. They're disgusted with the likes of all of
you. I am now approaching 1050 Access users who have requested fee-based
help from me. I am seeing more and more of these people by-passing the
newsgroups and coming straight to me because of the unprofessional
atmosphere that has been created by Arno R and his band of dimwiteers.
Lyle Fairfield not too long ago posted that he was seeing a decline in
participation. Everyone who is supporting and promoting Arno R and his
dimwiteers is contributing to the decline. You're seeing the same effect
"The Troll" had on the newsgroups some time ago. If you want to see this
downhill slide continue keep supporting anf promoting Arno R, John
Marshall and Keith Wilby.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!



"Randy Harris" <ra***@SpamFree.com> wrote in message
news:vz****************@newssvr22.news.prodigy.net ...

"PC Datasheet" <no****@nospam.spam> wrote in message
news:e7*****************@newsread1.news.atl.earthl ink.net...
By the way ----

--
Nick Coe (UK)
http://www.alphacos.co.uk/ AccHelp + pAnimal
http://www.pjandcoe.co.uk/ Online Store
http://www.mrcomputersltd.com/ Repairs Upgrades

Go to the first URL and it says "I am available for hire short term,
long
term or one off fixed price job to develop, design, support ......" He

does
not work for free!! Why aren't you harassing him???

Go to the second URL and it's about selling T-Shirts with pictures of
dogs
on them. That has nothing to do with Access!!! Why aren't you harassing
him???


Surely you can't really believe that is the same as what you have been
doing. There are many consultants that regularly post in this newsgroup,
you're the only what that posts adverstising. You don't see Nick, or
other
professionals, like Albert Kallal, Allen Browne or David Fenton
advertising
here. They all seem to be doing quite well as consultants. Can you
really
believe that repeatedly violating the CDMA charter and engaging in all of
this controversy is going to help your business?

Drop the advertising and return to only a link to your web site in your
sig.


Nov 23 '05 #29

P: n/a
"PC Datasheet" <no****@nospam.spam> wrote in message
news:xZ***************@newsread3.news.atl.earthlin k.net...
Here's an example from another newsgroup of what Arno R and his band of
dimwiteers are causing ---

<Sorry about the multiple threads. I was so tied up trying to fix this
and
then there was the message from PCDatasheet and StopThisAdvert.. and I
was
afraid my original inquiry was lost so I reposted. >

Of course, if you had not been advertising below your sig line, then Arno
would not have responded.

Simple cause and effect.
John... Visio MVP
Nov 23 '05 #30

P: n/a
A - Ha!!! So you are now saying it is okay to include URLs in the newsgroup
that advertise any kind of merchandiise or service. If this is the general
consensus of all newsgroup members, bring it on marketers!!!

Headline: John Marshall dwt okays placing your URL in the newsgroups to
advertise merchandise and services
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!

"John Marshall, MVP" <la******@stonehenge.ca> wrote in message
news:g7********************@magma.ca...
"PC Datasheet" <no****@nospam.spam> wrote in message
news:lN***************@newsread3.news.atl.earthlin k.net...
Once again your stupidity shines like a bright star!!!
Where do you think I got his URL for selling T-Shirts with dogs pictures
on them. Read my lips -- right out of CDMA!! You admit that it is pure
advertising and yet you say it is okay. I'm offering fee-based help with
Access to anyone who needs it. So why it is okay for him to sell T-shirts
with dog pictures in them in the newsgroup and you have been condemning
me for offering help with Access?


The advertising is not in CDMA, but on his webpage, yours is in CDMA. It
was your
choice to click on the URL. His message also contained content that was of
value to the
newsgroup, your "Contact me" did not.

-- more childish rants snipped.
PC Datasheet


Nov 23 '05 #31

P: n/a
Dimwit!!! My original response to MLH was only a suggestion to him to
checkout the Switch function which you "partially" conceded would work. My
code response was to you and not to MLH just to show you that ranges work
with the Switch function. Once again you clearly demonstrate you can't read
and that you are just a stupid dimwitted clod!!!!

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!



"John Marshall, MVP" <la******@stonehenge.ca> wrote in message
news:CJ******************************@magma.ca...
"PC Datasheet" <no****@nospam.spam> wrote in message
news:Zv***************@newsread3.news.atl.earthlin k.net...
You're the dimmest of the dimmest dimwits. It's hard to believe that
anyone could be as stupid as you. First you say it works and now you say
it doesn't work. It's just like everything you have been posting - it's
all a big fabrication (oops, sorry! you will have to get someone to
explain what that big-ggg word means!). Over and over you show your
ignorance and stupidity!!!


Excellent professional discussion. Definitely someone I should hire.
If you look at the code you will see that MyCount has to be an integer
and it has to be between 1 and 10. Sure it will crash outside those
parameters!!!


The original poster used 1 to 30, your code did not handle that. Any good
code should handle exceptions or is this an example of the "quality" of
work you get paid for?

You're so stupid that you tried it but then again I forgot
that you (and your mama) can't read. The constraints of those parameters
is exactly what my other post is about where your dimwitted protoge
condemned me for posting. And now his dimwitted underling stumbles over
it. Why don't you go to Keith W the third member of the dimwiteers and
have him explain it to you. It's just unbelievable how stupid you are
!!!!!!!!!!!!!!!!!!!!!!


More exquisite prose.
PC Datasheet

Strange way of spelling steve.

John... Visio MVP

Nov 23 '05 #32

P: n/a
Another dimwitted response!!!

I suggested to the poster something to try to solve her problem and Arno R's
worthless garbage made her afraid her original inquiry was lost so she
reposted. You certainly are an embarassment to good MVPs!!!

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!



"John Marshall, MVP" <la******@stonehenge.ca> wrote in message
news:Qo********************@magma.ca...
"PC Datasheet" <no****@nospam.spam> wrote in message
news:xZ***************@newsread3.news.atl.earthlin k.net...
Here's an example from another newsgroup of what Arno R and his band of
dimwiteers are causing ---

<Sorry about the multiple threads. I was so tied up trying to fix this
and
then there was the message from PCDatasheet and StopThisAdvert.. and I
was
afraid my original inquiry was lost so I reposted. >

Of course, if you had not been advertising below your sig line, then Arno
would not have responded.

Simple cause and effect.
John... Visio MVP

Nov 23 '05 #33

P: n/a
"PC Datasheet" <no****@nospam.spam> wrote in message
news:i7****************@newsread2.news.atl.earthli nk.net...
A - Ha!!! So you are now saying it is okay to include URLs in the newsgroup
that advertise any kind of merchandiise or service. If this is the general
consensus of all newsgroup members, bring it on marketers!!!

Headline: John Marshall dwt okays placing your URL in the newsgroups to
advertise merchandise and services


Still not able to read? I did not "approve" of using URLs or say it was
okay. I just pointed out that the ads were not in his post, but on a webpage
mentioned in his sigline.

John... Visio MVP
Nov 23 '05 #34

P: n/a
Okay, dimwit, is it okay for Nick to put his URL where he advertises
T-Shirts with dog pictures on them for sale in the newsgroup?

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!

"John Marshall, MVP" <la******@stonehenge.ca> wrote in message
news:r_******************************@magma.ca...
"PC Datasheet" <no****@nospam.spam> wrote in message
news:i7****************@newsread2.news.atl.earthli nk.net...
A - Ha!!! So you are now saying it is okay to include URLs in the
newsgroup that advertise any kind of merchandiise or service. If this is
the general consensus of all newsgroup members, bring it on marketers!!!

Headline: John Marshall dwt okays placing your URL in the newsgroups to
advertise merchandise and services


Still not able to read? I did not "approve" of using URLs or say it was
okay. I just pointed out that the ads were not in his post, but on a
webpage mentioned in his sigline.

John... Visio MVP

Nov 23 '05 #35

P: n/a
"PC Datasheet" <no****@nospam.spam> wrote in message
news:lj*****************@newsread2.news.atl.earthl ink.net...

Finally, as far as my business, people in these newsgroups see through all
the worthless garbage Arno R, John Marshall, Keith Wilby and now you are
polluting the newsgroups with. They're disgusted with the likes of all of
you.


If you don't want a libel suit on your hands Steve I suggest you retract
that statement, you're way out of line. You don't know what I think and you
most certainly do not speak for me. I am *deadly* serious about this, time
to stop the name-calling and libellous statements.
Nov 23 '05 #36

P: n/a
Although the use of the Select Case is perfectly OK and efficient there
is one potential problem.

The original question seemed to be asking how to split a range of
numbers into non-overlapping but fully exhaustive sub-ranges. By
writing:
Select Case MyCount
Case 1 To 4 : GS....
Case 5 To 10: GS...
Case 11 To 17: GS ...
Case 18 To 24: GS ...
etc
End Select

You must ensure that you do not leave gap or have overlaps. If you
decide that the 10 boundary, for example, should be 9, you MUST
remember to change it in two places. An alternative is to use a
properly constructed If statement:

If MyCount <= 4 then
GString = ...
ElseIf MyCount <= 7 then
GString = ...
ElseIf MyCount <= 11 Then
GString = ...
ElseIf MyCount <= 24 Then
GString = ...
.....
Else
GString = ...
End If

Now, if you want to change the breaks points you only have the change
one value and you are assured that there are no gaps.

By the way the messages from PD Datasheet do not irritate me. I did
not even notice that there was advertising until the other offensive
objections started to dominate the discussions. I find these far more
irritating; the abuse and language used is indefensible.

Nov 23 '05 #37

P: n/a
"Jim Devenish" <in***************@foobox.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...

By the way the messages from PD Datasheet do not irritate me. I did
not even notice that there was advertising until the other offensive
objections started to dominate the discussions. I find these far more
irritating; the abuse and language used is indefensible.


Hello Jim.

The advertising isn't an irritant to me per se but if everyone adopted the
same stance then this group would become unusable owing to spam overload.
If we all abide by the rules then everyone is happy. The majority of the
indefensibly abusive language comes from the perpetrator of the spamming. I
really don't think there's much point in trying to persuade him any longer
to give up so he'll be going into my KF. Once he's had enough rope he will
hang himself.

Regards,
Keith.
Nov 23 '05 #38

P: n/a
MLH
Salad, are you sure? Does't your syntax say that whatever is in the
middle is less than something on the left AND less than something
on the right? How does one determine a range from that?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

With your syntax the confusting thing is the <= and <=. Usually one
expects >= and <= to get a range.


Nov 23 '05 #39

P: n/a
MLH
Thx, Jim. I'll go with the Select - Case X To Y
architecture. I like it. Its easy to read - won't
slow me down when debugging (which I do
a lot of, believe me).

Select Case MyCount
Case 1 To 4 : GS....
Case 5 To 10: GS...
Case 11 To 17: GS ...
Case 18 To 24: GS ...
etc
End Select
Nov 23 '05 #40

P: n/a
MLH
To be clearer, I'll put in actual values: Take the case of X=5...
3 < 5 < 7 ==> I see no way to convey 5 being between 3 and 7
using any form of W > X < Y. You see what I mean. I was talking
in the OP (which I see has now turned into an advertising debate)
about a shorthand approach to defining a range. What I gather
is that there is no SYNTAXwise shorthand approach to defining
a range similar to the MATHwise correct 3 < X < 7. I can accept that.

Salad, are you sure? Does't your syntax say that whatever is in the
middle is less than something on the left AND less than something
on the right? How does one determine a range from that?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

With your syntax the confusting thing is the <= and <=. Usually one
expects >= and <= to get a range.


Nov 23 '05 #41

P: n/a
MLH wrote:
To be clearer, I'll put in actual values: Take the case of X=5...
3 < 5 < 7 ==> I see no way to convey 5 being between 3 and 7
using any form of W > X < Y. You see what I mean. I was talking
in the OP (which I see has now turned into an advertising debate)
about a shorthand approach to defining a range. What I gather
is that there is no SYNTAXwise shorthand approach to defining
a range similar to the MATHwise correct 3 < X < 7. I can accept that.


I understand what you mean. However, I'd change
W > X < Y
to
W >= X =< Y

IF's are handy for when you have MULTIPLE comparisons. SELECT CASE's
are handy when you have SINGLE comparisons. Back in FoxPro I could have
done a
CASE ID > 10 And Height > 5 And Width > 4
...process
CASE ID > 20 And Height = 5 And Width < 4
...process
but that was OK because FoxPro allowed multiple comparisons of different
values. Not so in VBA.

Yeah, "turned into an advertising debate" is actually "degenerated into
an advertising debate". What a pile of poop. But it's kind of like a
conversation...you talk about sending a man to the moon and at the end
of the conversation you are talking about fishing in a lake...not
related but very rambling.

Nov 23 '05 #42

P: n/a
Bri
John Marshall, MVP wrote:
Unlike the Select Case which has an ELSE clause, all conditions in a Switch
must be addressed.

For coding readabilty, the Select is easier to read.

Select Case MyCount
Case 1 To 4: GString = "a few days ago. "
Case 5 To 10: GString = "a week or so ago. "
Case 11 To 17: GString = "about 2 weeks ago. "
Case 18 To 24: GString = "about 3 weeks ago. "
Case 25 To 30: GString = "about month ago. "
Case Else: GString = " "
End Select

GString = Switch(MyCount >= 1 And MyCount <= 4, "a few days ago. ",
_
MyCount >= 5 And MyCount <= 10, "a week or so ago. ", _
MyCount >= 11 And MyCount <= 17, "about 2 weeks ago. ", _
MyCount >= 18 And MyCount <= 24, "about 3 weeks ago. ", _
MyCount >= 25 And MyCount <= 30, "about month ago. ", _
MyCount > 30, " ", MyCount < 1, " ")


There is only one place where I can see an advantage to the Switch
function and that is if you need to have a calculated field within an
SQL statement.

--
Bri

Nov 23 '05 #43

P: n/a

"PC Datasheet" <no****@nospam.spam> schreef in bericht news:xZ***************@newsread3.news.atl.earthlin k.net...
Randy,

Here's an example from another newsgroup of what Arno R and his band of
dimwiteers are causing ---

<Sorry about the multiple threads. I was so tied up trying to fix this and
then there was the message from PCDatasheet and StopThisAdvert.. and I was
afraid my original inquiry was lost so I reposted. >


Or this example dated 20-11-2005:
"yah go away pcdatabase, i dont need YOUR help. You greedy idiot, this forum
is to help people not to make money."

Or this example dated 21-11-2005:
"Good Morning, Gentlemen,

OK, so I'm still plugging away at this database, and while I'm a big fan of
the 1st Amendment, could you please find somewhere else to argue? Not that I
don't thoroughly enjoy the disappointment of logging on after receiving an
e-mail that someone has posted a reply and finding out that it's from some
schmuck who has nothing better to do that plug his own business. . . Steve,
if I wanted to (or even could. . .) pay someone for this, wouldn't it make
more sense for me to explore that option up-front instead of wasting my time
trying to learn how to do this for myself? I haven't written to you eagerly
expressing my rapacious desire for your oh-so-unselfish services, so please
find someone else's post to fill with nonsensical garbage. That will be all."

Need more examples of this? Contact me!

Arrno R

Nov 23 '05 #44

P: n/a

"Salad" <oi*@vinegar.com> schreef in bericht news:hf*************@newsread1.news.pas.earthlink. net...

But your sarcasm meter is so high I'd almost think I'm in a girly-boy
catfight.

The only person I have an issue with is/has been the moron with the
hard-on for David F. His posts have made this place a pisshole in the
past. Your catfight with Datasheet just adds to the BS in this place.

If you have anything to contribute to the group, contribute. Your war
with Datasheet is simply pissing and moaning in the wind for the sake of
nothing. Grow up and get a life.


Thanks for the free advice Salad!
I sure can understand people who are getting sick and tired of all this.

But what would be your advice for PCDatasheet?
(He is very encouraged by your message ... I already have seen him quoting you ...)

Arno R

Nov 23 '05 #45

P: n/a
StopThisAdvertising wrote:
"Salad" <oi*@vinegar.com> schreef in bericht news:hf*************@newsread1.news.pas.earthlink. net...
But your sarcasm meter is so high I'd almost think I'm in a girly-boy
catfight.

The only person I have an issue with is/has been the moron with the
hard-on for David F. His posts have made this place a pisshole in the
past. Your catfight with Datasheet just adds to the BS in this place.

If you have anything to contribute to the group, contribute. Your war
with Datasheet is simply pissing and moaning in the wind for the sake of
nothing. Grow up and get a life.

Thanks for the free advice Salad!

I sure can understand people who are getting sick and tired of all this.

But what would be your advice for PCDatasheet?
Me. Ignore it.

There are so many fine programmers here that help people for free. It'd
be nice if people simple had a tag line with a link to their site. But
the tag line like Datasheets doesn't rankle me. If he gets a customer
from it (most likely a rare occurrence) I won't take it personally.

That said, I never got into newsgroups with the idea to make money out
of it...I come from the old school of user groups where the motto was
"users helping users". Most users don't exploit free info.
(He is very encouraged by your message ... I already have seen him quoting you ...)
I took a hiatus from this group a while back and when I came back some
guy was posting links to pics of a man covered in feces and pretending
to help people and sending them off to other links of porn. That kind
of person ruins a group.

This fight between you and Datasheet doesn't add much to the
group...IMO. Its different than the porno guy, but distracting.

He can quote me if he wants tho I tend to agree with you guys. Play by
the rules and everyones OK. But this issue is not a high priority for
me...in this newsgroup or in my life.

Arno R

Nov 23 '05 #46

P: n/a
MLH <CR**@NorthState.net> wrote in
news:gq********************************@4ax.com:
Thx, Jim. I'll go with the Select - Case X To Y
architecture. I like it. Its easy to read - won't
slow me down when debugging (which I do
a lot of, believe me).

Select Case MyCount
Case 1 To 4 : GS....
Case 5 To 10: GS...
Case 11 To 17: GS ...
Case 18 To 24: GS ...
etc
End Select


You're making the wrong choice. What you're doing is an
If/Then/ElseIf/Else structure -- it's ideal for that.

And it short circuits just like the SELECT CASE.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 23 '05 #47

This discussion thread is closed

Replies have been disabled for this discussion.