Private Sub_Click PRMasterUpdate 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
}
end if
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
}
SEEK(MMF.databasetable, grd.Mno(row))
IF NOMATCH
{
Print "Material Number does not exist in the MMF"
}
ELSE
{
grd.descr==Description
grd.umsr==U_msr
}
end if
row==row+1
movenext(PRDF)
IF EOF or txtPRNo <> PRNo
{
txtReqby==Requestedby
txtappby==Approvedby
}
input txtDateNeeded
Input txtReqbyempno
SEEK (EMF.databasetable, txtReqByempno)
IF NOMATCH
{
Print "Employee Number does not exist in the Employee Master file
}
else
{
txtReqby==Fname+lname
}
input txtAppbyempno
SEEK (EMF.databasetable,txtAppbyempno)
IF NOMATCH
{
Print "Employee Number does not exist in the Employee Master File"
}
else
{
txtAppby==fname+lname
}
}
end if
End Sub
Private Sub_click cmdupdate
PRMF.Edit
PR_DateNeeded==txtdateneeded
Requestedby==txtReqByempno
Approvedby==txtAppByempno
PRMF.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 SGF
END SUB
Home »
» PURCHASE REQUISITION MASTER FILE UPDATE(date needed, Requested by, Approved by)