PdcApplication.ChooseQuery: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
== Code example == | == Code example == | ||
The example below lets the user select a supplier for a material (with multiple supplier switched on) and return the text entered for this material/supplier record. | |||
<source lang="vb"> | |||
function fstrGetLMITxts(rstrMatNr) | |||
dim strResult | |||
dim strSQL | |||
dim intLMIID | |||
dim tblSQL | |||
strResult = "" | |||
strSQL = "select * " &_ | |||
" from LMI_MAT " &_ | |||
" where LMI_MATN = '" & rstrMatNr & "'" &_ | |||
" order by LMI_LVNAAM" | |||
set tblSQL = pdc.ChooseQuery(strSQL, "Selecteer leverancier", "LMI_ID1", "LMI_ID1") | |||
strResult = tblSQL.GetField("LMI_TEKST") | |||
fstrGetLMITxts = strResult | |||
end function 'fstrGetLMITxts | |||
</source> | </source> | ||
== Availability == | == Availability == |
Revision as of 12:22, 15 August 2012
Declaration
ChooseQuery(SQL as String,Caption as String,KeyField as String,KeyID as String) as PdcDBTable
Description
Notes
Code example
The example below lets the user select a supplier for a material (with multiple supplier switched on) and return the text entered for this material/supplier record.
function fstrGetLMITxts(rstrMatNr)
dim strResult
dim strSQL
dim intLMIID
dim tblSQL
strResult = ""
strSQL = "select * " &_
" from LMI_MAT " &_
" where LMI_MATN = '" & rstrMatNr & "'" &_
" order by LMI_LVNAAM"
set tblSQL = pdc.ChooseQuery(strSQL, "Selecteer leverancier", "LMI_ID1", "LMI_ID1")
strResult = tblSQL.GetField("LMI_TEKST")
fstrGetLMITxts = strResult
end function 'fstrGetLMITxts