Private Sub_click DetailUpdate form
open.database EMF
open.database PRMF
open.database PRDF
open.database MMF
open.database SGF
SEEK (SGF.databasetable, SGFYear =="Year")
IF NOMATCH
{
Print "System Record not updated"
}
else
{
lblcom==comname
lbladdress==address
}
end if
row==1
input txtPRNo
SEEK (PRMF.databasetable,txtPRNo)
IF NOMATCH
{
Print" PR Number does not exist in the PR Master file"
{
else
{
txtdatereq==PR_DATERequested
txtdateneeded==PR_dateneeded
}
SEEK (PRDF.databasetable, txtPRNo)
if nomatch
{
PRINT" PR Number does not exist in the PR Detail File
}
else
{
grd.Mno==MNo
grd.qty==Qty_hand
}
end if
SEEK(MMF.databasetable, grd.Mno(row))
if nomatch
{
Print "Material Number does not exist in the MMF"
}
ESLE
{
grd.descr==description
grd.ums==U_msr
}
end if
row==row+1
movenext(PRDF)
IF EOF or txtPRNo <> PRNo
{
set.fucos SEEK (PRDF.databasetable, txtPRNo)
}
else
{
txtReqby==RequestedBy
txtApply==Approvedby
}
end if
input txtMNo
i=1 to row -1
if grid.Mno(i)==txtMno
{
input txtqtyregrd
grd.qty==txtqtygrd
}
else
{
Print "Material does not exist in the grid"
}
end if
End Sub
Private Sub_Click cmdUpdate
i=1 to row-1
SEEK(PRDF.databasetable,grdMno(i))
PRDF.EDIT
QtyRequired==QtyRequired + Val(grd.qty(i)
PRDF.UPDATE
End Sub
Private Sub_Click cmdcancel
clear all textboxes, grid
End Sub
Private Sub_Click cmdexit
close.database EMF
close.database PRMF
close.database PRDF
close.database MMF
close.database SGF
End Sub