How do i do this in VB? Here is my suitation, I need some guidence from VB pros.
I have yes or no question if yes - then use text entered as static text in query else use a field from the table in the query.
Y/N = 'Y'
select 'Test01' as Exp1, a.id_num from tblTest a
Y/N = 'n'
select a.crs_cde, a.ID_NUM from tblTest a
this is what i came up with. But does not do anything.
I have yes or no question if yes - then use text entered as static text in query else use a field from the table in the query.
Y/N = 'Y'
select 'Test01' as Exp1, a.id_num from tblTest a
Y/N = 'n'
select a.crs_cde, a.ID_NUM from tblTest a
this is what i came up with. But does not do anything.
WScript.StdOut.Writeline
WScript.StdOut.Write "Replace word with new word(e.g. y/n) and press Enter: "
u_Ryn = WScript.StdIn.Readline
if u_Ryn = "y" then
WScript.StdOut.Writeline
WScript.StdOut.Write "Enter new word (e.g. IDS_110) and press Enter: "
u_BBCrsName = WScript.StdIn.Readline
R_crs = u_BBCrsName
else
R_crs = tbltest.crs_cde
end if
comm.commandtext="SELECT " & R_Crs & "as Test01, a.ID_NUM from tblTest a"
set rs = execute()
end if
..
.
.
..
Last edited: