I am using a third party Active X Control from DBI Technology called Solutions Schedule 3.0. I first wrote code to query a database and then fill in fields in the control. This code worked fine until I set autoyield equal to .F. Now the code fails with the following error...<br>
<br>
Alias 'COLS' is not found. Line #43<br>
<br>
Any suggestions would be helpful. Thanks in advance.<br>
<br>
This is the section of code that is failing...<br>
<br>
SELECT Collections.col_date, Collections.employeeno;<br>
FROM park!Collections;<br>
WHERE ALLTRIM(Collections.route) = ALLTRIM(Sched.route);<br>
ORDER BY Collections.col_date; <br>
Into Cursor Cols<br>
<br>
If Reccount("Cols" > 0<br>
<br>
Go top<br>
<br>
Do While !EOF()<br>
<br>
*** THIS LINE EXECUTES SUCCESSFULLY ****<br>
nBarID = Thisform.ctSchedule1.AddKeyTimeBar(nIndexID, ;<br>
0, ; 1440, ;<br>
Thisform.numdate(Cols.col_date), ;<br>
Thisform.numdate(Cols.col_date), 0)<br>
<br>
*** THIS IS LINE # 43 WHICH GENERATES <br>
*** "Alias 'COLS' is not found."<br>
*** WHEN autoyield is set to .F.<br>
<br>
cHHNum = SUBSTR(TRIM(Cols.employeeno), LENC(TRIM(Cols.employeeno))-2,3)<br>
thisform.ctSchedule1.BarText(nIndexID, nBarID ) = cHHNum<br>
thisform.ctSchedule1.BarTextAlign(nIndexID, nBarID ) = 2 <br>
<br>
nCount = thisform.ctSchedule1.AddBarStyle(20, 0) <br>
thisform.ctSchedule1.StyleBackColor(nCount) = RGB(0,255,0) <br>
thisform.ctSchedule1.BarStyle(nIndexID, nBarID ) = nCount <br>
<br>
SKIP IN Cols<br>
ENDDO<br>
ENDIF <br>
<br>
Alias 'COLS' is not found. Line #43<br>
<br>
Any suggestions would be helpful. Thanks in advance.<br>
<br>
This is the section of code that is failing...<br>
<br>
SELECT Collections.col_date, Collections.employeeno;<br>
FROM park!Collections;<br>
WHERE ALLTRIM(Collections.route) = ALLTRIM(Sched.route);<br>
ORDER BY Collections.col_date; <br>
Into Cursor Cols<br>
<br>
If Reccount("Cols" > 0<br>
<br>
Go top<br>
<br>
Do While !EOF()<br>
<br>
*** THIS LINE EXECUTES SUCCESSFULLY ****<br>
nBarID = Thisform.ctSchedule1.AddKeyTimeBar(nIndexID, ;<br>
0, ; 1440, ;<br>
Thisform.numdate(Cols.col_date), ;<br>
Thisform.numdate(Cols.col_date), 0)<br>
<br>
*** THIS IS LINE # 43 WHICH GENERATES <br>
*** "Alias 'COLS' is not found."<br>
*** WHEN autoyield is set to .F.<br>
<br>
cHHNum = SUBSTR(TRIM(Cols.employeeno), LENC(TRIM(Cols.employeeno))-2,3)<br>
thisform.ctSchedule1.BarText(nIndexID, nBarID ) = cHHNum<br>
thisform.ctSchedule1.BarTextAlign(nIndexID, nBarID ) = 2 <br>
<br>
nCount = thisform.ctSchedule1.AddBarStyle(20, 0) <br>
thisform.ctSchedule1.StyleBackColor(nCount) = RGB(0,255,0) <br>
thisform.ctSchedule1.BarStyle(nIndexID, nBarID ) = nCount <br>
<br>
SKIP IN Cols<br>
ENDDO<br>
ENDIF <br>