From: Sam on 6 Feb 2010 10:33 I have two string expressions, A and B, that I would like to check for case match. In my code I have If A=B Then do something End If I need for the comparison to be case sensitive. How can I do that? Thanks so much! Sam
From: Douglas J. Steele on 6 Feb 2010 12:37 If StrComp(A, B, vbBinary) = 0 Then do something End If -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Sam" <Sam(a)discussions.microsoft.com> wrote in message news:247EE0D9-0182-4AE1-9385-2F4C57D4FB85(a)microsoft.com... >I have two string expressions, A and B, that I would like to check for case > match. > In my code I have > > If A=B Then > do something > End If > > I need for the comparison to be case sensitive. How can I do that? > Thanks so much! > Sam
From: John W. Vinson on 6 Feb 2010 12:37 On Sat, 6 Feb 2010 07:33:01 -0800, Sam <Sam(a)discussions.microsoft.com> wrote: >I have two string expressions, A and B, that I would like to check for case >match. >In my code I have > > If A=B Then > do something > End If > >I need for the comparison to be case sensitive. How can I do that? >Thanks so much! >Sam Use the builtin StrComp() function: If StrComp(A, B, vbBinaryCompare) = 0 Then -- John W. Vinson [MVP]
From: Linq Adams via AccessMonster.com on 6 Feb 2010 17:32 If you wanted ***all comparisons*** in your form to be Case Sensitive, at the top of your code module you could replace Option Compare Database with Option Compare Binary -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201002/1
From: John W. Vinson on 6 Feb 2010 17:54 On Sat, 06 Feb 2010 22:32:32 GMT, "Linq Adams via AccessMonster.com" <u28780(a)uwe> wrote: >If you wanted ***all comparisons*** in your form to be Case Sensitive, at the >top of your code module you could replace > >Option Compare Database > >with > >Option Compare Binary Linq, won't that just make VBA comparisons case sensitive? My understanding is that Queries will still be insensitive to case. -- John W. Vinson [MVP]
|
Next
|
Last
Pages: 1 2 Prev: Restrict memo field to size of text box Next: Saving records for later recall |