A
Armin
How do I exclude some values from combo box? What I'm
trying to do is to exclude programs to which donor has
already donated from all available programs.
My code so far:
Dim strProg As String, strsql As String
strProg = " SELECT tblcontrib.Program,
tblcontrib.DonorID " & _
" FROM tblcontrib " & _
" WHERE (((tblcontrib.DonorID)=[Forms]![frmdonors]!
[DonorID]));"
this would return 1 or more values like : Food, Clothing,
SH
TABLE WITH ALL PROGRAMS, WHICH HAS 20 PROGRAMS
strsql = " SELECT tblprog.program FROM tblprog WHERE
((tblprog.program)NOT LIKE ' " & VarProg & ")"
Me!CmbProg.RowSource = strsql
This code works fine if strProg returns one value but when
it returns 2 or more it doesn't.
How do I put OR between every value that strProg returns?
I'm also open to any other suggestions.
Thanks in advance
Armin
trying to do is to exclude programs to which donor has
already donated from all available programs.
My code so far:
Dim strProg As String, strsql As String
strProg = " SELECT tblcontrib.Program,
tblcontrib.DonorID " & _
" FROM tblcontrib " & _
" WHERE (((tblcontrib.DonorID)=[Forms]![frmdonors]!
[DonorID]));"
this would return 1 or more values like : Food, Clothing,
SH
TABLE WITH ALL PROGRAMS, WHICH HAS 20 PROGRAMS
strsql = " SELECT tblprog.program FROM tblprog WHERE
((tblprog.program)NOT LIKE ' " & VarProg & ")"
Me!CmbProg.RowSource = strsql
This code works fine if strProg returns one value but when
it returns 2 or more it doesn't.
How do I put OR between every value that strProg returns?
I'm also open to any other suggestions.
Thanks in advance
Armin