Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Type Mismatch and I cannot find it.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Data Type Mismatch and I cannot find it.
Miscellaneous
Thread ID:
00671836
Message ID:
00671836
Views:
47
Hello everyone!

I get a data type mismatch whenever my form init runs. It displays my form anyway and I bypass the error with Ignore. After I bypass the error I am able to run my form and navigate Top, Prev, Next, Bottom without any more errors. The error obly happens when in Form Init. The form is modal. It is called by a .PRG with a DO FORM myForm command. The form is just a bunch of textboxes with some character fields, some numeric fields, and a date field. All data is displayed in all fields correctly even when navigating between records. When I ran debugger to help find the error, I suspend the form running and go to Trace window and get the error, Source is out of date.
I am out of ideas. Got any ideas? Thanks very much. There must be something I am overlooking.

Here is the Init coding-
_SCREEN.CAPTION = "AGENCY MAINTENANCE"
USE agency IN 0 SHARED
SELECT agency
GO BOTTOM
SCATTER MEMVAR MEMO
* Build form caption
mast_cap = ALLT(m.agcy_name)
isediting = .F.
THISFORM.Caption = "BROWSING   " + mast_cap
*THISFORM.Refresh
*THISFORM.Setbackcolor
THIS.LockScreen = .T.
* Set data entry boxes backgrnd color
* Yellow is no data, White is data
FOR ii = 1 TO THIS.ControlCount
	IF THIS.Controls(ii).BaseClass = "Textbox" OR ;
		THIS.Controls(ii).BaseClass = "Editbox" OR ;
		THIS.Controls(ii).BaseClass = "Combobox" OR ;
		THIS.Controls(ii).BaseClass = "Checkbox"
    	   THIS.Controls(ii).BackColor = ;
	    	IIF(EMPTY(THIS.Controls(ii).Value),RGB(255,255,128),RGB(255,255,255))
	       THIS.Controls(ii).DisabledBackColor = ;
   			IIF(EMPTY(THIS.Controls(ii).Value),RGB(255,255,128),RGB(255,255,255))
	ENDIF
NEXT
THIS.Lockscreen = .F.
THISFORM.Refresh
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site: www.stephenkramer.com
Would you believe Far Side Lite?
More than 270 original cartoons.
Next
Reply
Map
View

Click here to load this message in the networking platform