G
Guest
Hi all, not too good at this but i am using the following statement to use
the last record :
strSql = "SELECT * FROM tbl_CIANumberRequest ORDER BY dtAdded DESC"
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset(strSql, , dbReadOnly)
strReqNo = rst!RequestID
strReqC = rst!RequestorCName
strReqS = rst!RequestorSName
strName = strReqC & " " & strReqS
strReqD = rst!RequestorDept
curAmnt = rst!Amount
strTlDesc = rst!ToolingDescription
strGams = Nz(rst!gAMSNo, "N/A")
strProj = Nz(rst!ProjectNo, "N/A")
strPrtNo = Nz(rst!PartNumber, "N/A")
strChgNo = Nz(rst!ChangeNo, "N/A")
strAss = Nz(rst!AssetNumber, "None")
strNew = Nz(rst!NewTool, "")
strOld = Nz(rst!OldTool, "")
strCur = rst!Currency
This selects the last record and the other fields are for input in a message.
But what i would like to do is ask the user which record he would like to
use, so the input box would request the number of the record then i use that
record for the information pertaining to it.
Any help would be greatly appreciated..
the last record :
strSql = "SELECT * FROM tbl_CIANumberRequest ORDER BY dtAdded DESC"
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset(strSql, , dbReadOnly)
strReqNo = rst!RequestID
strReqC = rst!RequestorCName
strReqS = rst!RequestorSName
strName = strReqC & " " & strReqS
strReqD = rst!RequestorDept
curAmnt = rst!Amount
strTlDesc = rst!ToolingDescription
strGams = Nz(rst!gAMSNo, "N/A")
strProj = Nz(rst!ProjectNo, "N/A")
strPrtNo = Nz(rst!PartNumber, "N/A")
strChgNo = Nz(rst!ChangeNo, "N/A")
strAss = Nz(rst!AssetNumber, "None")
strNew = Nz(rst!NewTool, "")
strOld = Nz(rst!OldTool, "")
strCur = rst!Currency
This selects the last record and the other fields are for input in a message.
But what i would like to do is ask the user which record he would like to
use, so the input box would request the number of the record then i use that
record for the information pertaining to it.
Any help would be greatly appreciated..