JRussell
25th October 2002, 16:36
Hi all,
I'm just a beginner and need some help. I want to limit the display of records on a form that is zoomed to.
I have a form A. I zoom from a field on form A to form B. I only want records on form B to be displayed that have the "key" of Form A. I'm getting very confused doind this. I don't know whether to export the "key" value to form B or not. I have the following code in form A at the moment, but its having no affect on the zoomed to form B.
Can anyone help me??? Please, please, please......
MY CODE SO FAR (THE PART IN SELECTEMPTY WORKS FINE, ITS REALLY ONLY THE WHERE .. EXISTS PART I AM HAVING TROUBLE)
export("temppono", temppono)
|***Only display those entries relating to the current rec
select wawti611.*
from wawti611
where exists
(select wawti611.*
from wawti611
where wawti611.pono = :temppono)
selectempty
|*** Before zooming to enter in reason codes, orrect key values and defaults setup if wawti601.dthrstot = 0 then lastentryno = db.last(db.bind("twawti611"), DB.LOCK)
wawti611.pono = wawti601.pono
if wawti611.key >= lastentryno then
tempkey = wawti611.key
wawti611.key = tempkey + 1
endif
wawti611.date = wawti601.date
wawti611.dthrsact = 0
wawti611.reasonco = ""
wawti611.wkcentre = wawti601.wkcentre
wawti611.item = wawti601.item
wawti611.pdvolact = wawti601.pdvolact
wawti611.changeov = 0
wawti611.nomat = 0
wawti611.noop = 0
wawti611.projects = 0
wawti611.adjustmt = 0
wawti611.startup = 0
db.insert(twawti611)
commit.transaction()
endif
endselect
I'm just a beginner and need some help. I want to limit the display of records on a form that is zoomed to.
I have a form A. I zoom from a field on form A to form B. I only want records on form B to be displayed that have the "key" of Form A. I'm getting very confused doind this. I don't know whether to export the "key" value to form B or not. I have the following code in form A at the moment, but its having no affect on the zoomed to form B.
Can anyone help me??? Please, please, please......
MY CODE SO FAR (THE PART IN SELECTEMPTY WORKS FINE, ITS REALLY ONLY THE WHERE .. EXISTS PART I AM HAVING TROUBLE)
export("temppono", temppono)
|***Only display those entries relating to the current rec
select wawti611.*
from wawti611
where exists
(select wawti611.*
from wawti611
where wawti611.pono = :temppono)
selectempty
|*** Before zooming to enter in reason codes, orrect key values and defaults setup if wawti601.dthrstot = 0 then lastentryno = db.last(db.bind("twawti611"), DB.LOCK)
wawti611.pono = wawti601.pono
if wawti611.key >= lastentryno then
tempkey = wawti611.key
wawti611.key = tempkey + 1
endif
wawti611.date = wawti601.date
wawti611.dthrsact = 0
wawti611.reasonco = ""
wawti611.wkcentre = wawti601.wkcentre
wawti611.item = wawti601.item
wawti611.pdvolact = wawti601.pdvolact
wawti611.changeov = 0
wawti611.nomat = 0
wawti611.noop = 0
wawti611.projects = 0
wawti611.adjustmt = 0
wawti611.startup = 0
db.insert(twawti611)
commit.transaction()
endif
endselect