i have the following code on a form that runs a queery for me, i get an error msg that said " cannot find varrible deptssan" and a second error msg that states " tables are not indexed" i check the data envoriment and the tables "tempquerry 6", "dept" and "last work" seem to have no relationship i think they were deleted. can anyone help me fix this problem.
SELECT dept, name, ssan, phone, ;
street, cityzip, pay, bill, start_date, tax ;
FROM tmpQuery6 ;
WHERE deleted() = .t. ;
INTO TABLE tmpQuery7.dbf
******* find cleartext for dept name ******
SELECT dept
LOCATE for dept = m.department
m.deptClear = dept.name
SELECT tmpQuery7
********** fill with blank lines ********
go bottom
m.numRecords = recno()
IF m.numRecords < 21
numLines = 21 - m.numRecords
ELSE
numLines = 21 - (MOD(m.numRecords, 21))
ENDIF
FOR loop = 1 TO numLines
append blank
ENDFOR
********* print the report *********
set deleted on
set order to
report form sign_in.frx to print prompt noco
set deleted off
thisform.release
*********** update lastwork.dbf *********
SELECT tmpQuery7
INDEX ON ssan TO ssan
SELECT lastwork
SET RELATION TO Lastwork.ssan INTO Tmpquery7 ADDITIVE
REPLACE last_work WITH m.eventDate ;
FOR lastwork.dept == tmpquery7.dept
SET RELATION TO
select tmpquery
use
select tmpquery2
use
select tmpquery3
use
select tmpquery4
use
select tmpquery5
use
select tmpquery6
use
select tmpquery7
use
SELECT dept, name, ssan, phone, ;
street, cityzip, pay, bill, start_date, tax ;
FROM tmpQuery6 ;
WHERE deleted() = .t. ;
INTO TABLE tmpQuery7.dbf
******* find cleartext for dept name ******
SELECT dept
LOCATE for dept = m.department
m.deptClear = dept.name
SELECT tmpQuery7
********** fill with blank lines ********
go bottom
m.numRecords = recno()
IF m.numRecords < 21
numLines = 21 - m.numRecords
ELSE
numLines = 21 - (MOD(m.numRecords, 21))
ENDIF
FOR loop = 1 TO numLines
append blank
ENDFOR
********* print the report *********
set deleted on
set order to
report form sign_in.frx to print prompt noco
set deleted off
thisform.release
*********** update lastwork.dbf *********
SELECT tmpQuery7
INDEX ON ssan TO ssan
SELECT lastwork
SET RELATION TO Lastwork.ssan INTO Tmpquery7 ADDITIVE
REPLACE last_work WITH m.eventDate ;
FOR lastwork.dept == tmpquery7.dept
SET RELATION TO
select tmpquery
use
select tmpquery2
use
select tmpquery3
use
select tmpquery4
use
select tmpquery5
use
select tmpquery6
use
select tmpquery7
use