DbLook up problem

HI

i m wrking on Web application developement

on one of the form i have four computed text box

1,Company name, 2.Region, 3.City, 4.country

In company name i have one picturebox on clicking on that it opens new form and allows diffrent county, region and city based on which company you r selecting.

after selecting appropriately company(text box). i m dblookuping company as key filed on another combo, but it always give me error,

my code on combobo is :

vw:=“vwtargetdb”;

key:=“CompanyNameTX”;

ResponseReceivedFrom:=@DbLookup(“”:“NoCache”;“”;vw;key;12);

@If(@IsError(ResponseReceivedFrom);“error”;ResponseReceivedFrom);

but it seems always to be error:

my default setting on view is “sorted” and “categorized”

on combobox settings control fields are:

“Refresh choice on document refresh”

“allow keyword synonyms”

i think probs is that combo on which i lokup, is gives error on load of the form because i yet have to select the company from the companynametx field, and selecting that value:

What is actulally problem i m getting can u say :

on more thing is that in view the value are like for R shankar,r rajek, etc for that company fileld

can u seek inside this one

Devs""

Subject: DbLook up problem

Your lookup key is the hardcoded string value “CompanyNameTX”, not the value from the CompanyNameTX field.

You could change the formula to return nothing if no Company has yet been selected…

REM {This line stops the rest of the formula if Company is not yet selected};

@If (CompanyNameTX = “”; @Return(“”); “”);

vw:=“vwtargetdb”;

REM {This linesets the temp variable ‘key’ to the current value of the CompanyNameTX field};

key:=CompanyNameTX;

ResponseReceivedFrom:=@DbLookup(“”:“NoCache”;“”;vw;key;12);

@If(@IsError(ResponseReceivedFrom);“error”;ResponseReceivedFrom);

Subject: RE: DbLook up problem

Hi james

thx for reply

i have done so,.

but still it will give no value in combobox after selecting the company name:

FYI: the value is i m getting is multivalued from view and combox i want to like selecting as general combo we usually using:

awaiting for correct reply

thx in advance

DEVs""

Subject: RE: DbLook up problem

You did remove the quotes from this line, right?

key:=“CompanyNameTX”;

Subject: and is the form actually refreshing after the company name is selected?

Subject: RE: and is the form actually refreshing after the company name is selected?

Nothing is going to refresh!!

Any idea!!

Subject: RE: and is the form actually refreshing after the company name is selected?

Check the properties of field CompanyNameTX:the option “Refresh Fields on keyword change” should be checked.

Change your Code to make it more easy to see the what happens, ie:

vw:=“vwtargetdb”;

key:=CompanyNameTX;

ResponseReceivedFrom:=@DbLookup(“”:“NoCache”;“”;vw;key;12);

@If(@IsError(ResponseReceivedFrom);"error " + @text(ResponseReceivedFrom) + " on Keylookup " + @text(key);ResponseReceivedFrom);