W
WC Justice
I would like to be able to call a particular subroutine based on recordset
data.
For example, if rs.fields("FormID") = 29, I would like to be able to call
PreviewDocument29 by doing something like this:
strSubName = "PreviewDocument" & rs.fields("FormID")
call strSubName
I am currently doing it the crude way:
if rs.fields("FormID") = 1 then
call PreviewDocument1
elseif rs.fields("FormID") = 2 then
call PreviewDocument2
....
end if
If strSubName needs to be an object of some sort, I don't know what it needs
to be. Any help would be appreciated.
data.
For example, if rs.fields("FormID") = 29, I would like to be able to call
PreviewDocument29 by doing something like this:
strSubName = "PreviewDocument" & rs.fields("FormID")
call strSubName
I am currently doing it the crude way:
if rs.fields("FormID") = 1 then
call PreviewDocument1
elseif rs.fields("FormID") = 2 then
call PreviewDocument2
....
end if
If strSubName needs to be an object of some sort, I don't know what it needs
to be. Any help would be appreciated.