stanmurphy
Technical User
- Oct 14, 2000
- 89
Hello All,
The following code is the beginning of a program that is called from the Click Event of the textbox control in a single column grid.
***************************************
PROCEDURE EditAppt
PARAMETERS pGridNumber
PRIVATE mDay,dtCurrentDate, mThisGrid, mMonth, mYear, mSeek
STORE "curGridcursor"+ALLTRIM(STR(pGridNumber)) TO mThisGrid
STORE CTOD(schedule.pcurrentday) TO dtCurrentdate
STORE ALLTRIM(STR(DAY(curGridCursor1.curApptDate))) TO mDay
IF LEN(mDAY) = 1
mDAY = "0"+mDAY
ENDIF
STORE ALLTRIM(STR(MONTH(curGridCursor1.curApptDate))) TO mMonth
STORE ALLTRIM(STR(YEAR(curGridCursor1.curApptDate))) TO mYear
SELECT APPT && the Appointments File
SET ORDER TO ByAll && CounName, ApptDateTime
GO top
STORE ALLTRIM(curGridCursor1.curcounname)+;
mMONTH+"/"+mDAY+"/"+mYEAR+" "+TTOC(curGridCursor1.curApptDate,2) TO mSEEK
SEEK mSEEK
**************************************************
As you can see, I am explicity calling the table called APPT. However, by the time the SEEK is executed, ALIAS() displays the name of the cursor that feeds the grid, not the APPT table. I don't understand why I don't get an error on the SET ORDER TO if APPT is not actually the current workspace.
The tables are opened in my MAIN program.
I'm baffled. Any ideas??
Thanks
The following code is the beginning of a program that is called from the Click Event of the textbox control in a single column grid.
***************************************
PROCEDURE EditAppt
PARAMETERS pGridNumber
PRIVATE mDay,dtCurrentDate, mThisGrid, mMonth, mYear, mSeek
STORE "curGridcursor"+ALLTRIM(STR(pGridNumber)) TO mThisGrid
STORE CTOD(schedule.pcurrentday) TO dtCurrentdate
STORE ALLTRIM(STR(DAY(curGridCursor1.curApptDate))) TO mDay
IF LEN(mDAY) = 1
mDAY = "0"+mDAY
ENDIF
STORE ALLTRIM(STR(MONTH(curGridCursor1.curApptDate))) TO mMonth
STORE ALLTRIM(STR(YEAR(curGridCursor1.curApptDate))) TO mYear
SELECT APPT && the Appointments File
SET ORDER TO ByAll && CounName, ApptDateTime
GO top
STORE ALLTRIM(curGridCursor1.curcounname)+;
mMONTH+"/"+mDAY+"/"+mYEAR+" "+TTOC(curGridCursor1.curApptDate,2) TO mSEEK
SEEK mSEEK
**************************************************
As you can see, I am explicity calling the table called APPT. However, by the time the SEEK is executed, ALIAS() displays the name of the cursor that feeds the grid, not the APPT table. I don't understand why I don't get an error on the SET ORDER TO if APPT is not actually the current workspace.
The tables are opened in my MAIN program.
I'm baffled. Any ideas??
Thanks