Having a serious brain-fart, because this should be simple, but I can't
figure out what I'm doing wrong.
I have a very simple form with one grid on it. The grid has as its
record source a fairly simple remote view. The remote view does some
record filtering and one field calculation.
In one of the columns I put in a command button so the user can take an
action on the record -- it is called "In_Room". What it does is replace
the In_Room field with a "Y" as opposed to a "N". What the Med Tech has
done here is placed the patient into an exam room. The provider at
another location (could be another exam room or their office) will see
the update in two (2) minutes on their client.
The other action the "In_Room" button does is generate a message box
asking for confirmation of the action.
This is the code in the click event of the command button:
LOCAL nRecno, cRecno, nHuh, nQR, lTuv
nRecno=0
cRecno=""
nHuh=0
nRecno=RECNO()
cRecno=ALLTRIM(STR(nRecno))
nQR=0
lTuv = .F.
*' WAIT WINDOW AT 30, 50 "What do I do now? At Record: "+cRecno
nHuh=MESSAGEBOX("Check In Patient "+Last_name,292,"Confirm CheckIn
Operation")
SUSPEND
IF nHuh=6
*REPLACE in_room WITH 'Y', Check_in_time WITH TIME()
UPDATE rvCheckin SET in_room = "Y", Check_in_time = TIME()
lTuv=TABLEUPDATE(.T.,.T.)
THISFORM.grid1.RECORDSOURCE=""
THIS.REFRESH
THISFORM.grid1.RECORDSOURCE="rvcheckin"
THIS.REFRESH
nQR=REQUERY()
ENDIF
IF nQR = 1
WAIT WINDOW AT 30, 50 "Requery of rvCheckIn successful"
ELSE
WAIT WINDOW AT 30, 50 "Requery status: " + ALLTRIM(STR(nQR))
ENDIF
It use to be after the nHuh If fired I would just do the requery() and
the record would disappear from the grid. I didn't have the
recordsource manipulation in there; I just put that in to see if I could
get it to work.
'get it to work' meaning the record would disappear from the grid. The
remote view is filtering for In_Room to be 'N'.
The nQR check is showing the requery() is returning a -1. What have I
screwed up?
v/r
//SIGNED//
Stephen S. Wolfe, YA2, DAF
6th MDG Data Services Manager
6th MDG Information System Security Officer
Comm (813) 827-9994 DSN 651-9994
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/%(messageid)s
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.