Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detect state of memofield and textbox
Message
From
13/11/2012 04:35:29
 
 
To
13/11/2012 02:17:58
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01557010
Message ID:
01557014
Views:
51
>having trouble determing state of editbox when a memofield is blank
>
>
>oFrm.Edit1.Value = filetostr('m.txt')  && original memofield is copied to m.txt 
>
>pass through an editbox to add to the memofield and now i am trying to compare the original memofield with the editbox info
>
>if not empty oFrm.Edit1.Value  &&& is editbox empty 
>wait window 'empty this works'
>endif
>
>if oFrm.Edit1.Value # filetostr('m.txt')     &&&& 'original memo field empty and editbox has data 
>wait window 'this does not work SITUATION IS NOT DETECTED' 
>endif
>
>if filetostr('m.txt') = " "   original memofield empty
>wait window 'this does not work SITUATION IS NOT DETECTED'
>endif
>
>any help with correct effective code for these two situations much appreciated.
>
>k

Hi,

on top of all the good tips you received here some remarks:

1) sure hope this is for testing only as the use of a file m.text in your application is a showstopper. Never ever use a oneletter file and surely donot use the "m"
2) not completely sure why about your coding suppose you only wrote this for yourselve to proof the the (memo)field in question does not have the value you expected. If that is the case I would recommend you to make use of the debugger.:
start up the degugger
start your program
set in the watch windo the field you are interested in
step through your coding and watch the value of that field.

Hope this helps you.

Regards,

Koen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform