dbTalk Databases Forums  

InStr help needed

comp.databases.ms-access comp.databases.ms-access


Discuss InStr help needed in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bobh
 
Posts: n/a

Default InStr help needed - 01-23-2009 , 10:00 AM






Hi All,
I not understanding why this is not working

If Len(InStr(1, MyRec!CmpltdUnits, ".")) = 0 Then

cmpltdunits is a double datatype(fieldsize) and if the value in
myrec!cmpltdunits is 1 the above does not valuate to true.

cmpltdunits could contain as an example .34 or 1 or 53.24, etc...

what I'm trying to do is detect if the value has a decimal point in
it. If the above is not correct then what is the correct expression.
thanks
bobh.

Reply With Quote
  #2  
Old   
bobh
 
Posts: n/a

Default Re: InStr help needed - 01-23-2009 , 10:17 AM






ok, this worked

If Len(Right(MyRec!CmpltdUnits, InStr(MyRec!CmpltdUnits, "."))) = 0
Then

bobh.

On Jan 23, 11:00*am, bobh <vulca... (AT) yahoo (DOT) com> wrote:
Quote:
Hi All,
I not understanding why this is not working

If Len(InStr(1, MyRec!CmpltdUnits, ".")) = 0 Then

cmpltdunits is a double datatype(fieldsize) and if the value in
myrec!cmpltdunits is 1 the above does not valuate to true.

cmpltdunits could contain as an example .34 or 1 or 53.24, etc...

what I'm trying to do is detect if the value has a decimal point in
it. If the above is not correct then what is the correct expression.
thanks
bobh.


Reply With Quote
Reply




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 On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.