Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Case Select Issues

Status
Not open for further replies.

cranebill

IS-IT--Management
Jan 4, 2002
1,113
US
Ok here is the code as follows:

Select Case ContactID
Case (ContactID > 10131) And (ContactID < 10242)
QuoteNumber = Forms![FollowUpsDueToday]![OriginalQuoteNumber]
Case Else
QuoteNumber = Forms![FollowUpsDueToday]![ContactID]
End Select


Ok now ContactID is the number 10152 but i may have done this wrong.... ContactID was Dimed as a string in the beginning and then i used a :
ContactID = Forms![ etc.....

Anyway the when the form is ran even though the number in question is between the two numbers in the case field.... it goes to the Case Else side. Any idea why?

Any Help would be appreciated.

Bill
 
If ContactID is a dimensioned as a string then:

Select Case ContactID
Case (Val(ContactID) > 10131) And (Val(ContactID) < 10242)
QuoteNumber = Forms![FollowUpsDueToday]![OriginalQuoteNumber]
Case Else
QuoteNumber = Forms![FollowUpsDueToday]![ContactID]
End Select

Good luck! Anthony J. DeSalvo
President - ScottTech Software
&quot;Integrating Technology with Business&quot;
 
try:

Select Case ContactID
Case is > 10131 And ContactID < 10242
QuoteNumber = Forms![FollowUpsDueToday]![OriginalQuoteNumber]
Case Else
QuoteNumber = Forms![FollowUpsDueToday]![ContactID]
End Select

or:

Select Case ContactID
Case 10131 to 10242
QuoteNumber = Forms![FollowUpsDueToday]![OriginalQuoteNumber]
Case Else
QuoteNumber = Forms![FollowUpsDueToday]![ContactID]
End Select
 
Thank you guys.... greatly appreciated.

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top