R
Robert Smith
Hi,
I have a problem whereby I have one form dealing with one of two
typed datasets with almost all the same column names except two, depenind on
which option the user selects.
at the moment I have if statements like the following that set the value of
form fields etc, depeninding on the selected value
if (selectedtab = "Agency")
{
txtfield.Name = AgencyDataset.AgencyTable[currentindex].AgencyName ;
}else if (selectedbat = "Advertiser") then
{
txtfield.Name =
AdvertiserDataset.AdvertiserTable[currentindex].AdvertiserName;
}
do you know of a smarter way of doing this so I don't have to continually do
if statements to determine which dataset to use and also to avoid getting
type casting errors.
Thanx in advance
Robert
I have a problem whereby I have one form dealing with one of two
typed datasets with almost all the same column names except two, depenind on
which option the user selects.
at the moment I have if statements like the following that set the value of
form fields etc, depeninding on the selected value
if (selectedtab = "Agency")
{
txtfield.Name = AgencyDataset.AgencyTable[currentindex].AgencyName ;
}else if (selectedbat = "Advertiser") then
{
txtfield.Name =
AdvertiserDataset.AdvertiserTable[currentindex].AdvertiserName;
}
do you know of a smarter way of doing this so I don't have to continually do
if statements to determine which dataset to use and also to avoid getting
type casting errors.
Thanx in advance
Robert