Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop down datawindow behavior

Status
Not open for further replies.

vadnagra

Technical User
Oct 10, 2004
23
0
0
US
I have a drop down datawindow created from a Country view. The fields are id and name.

The primary datawindow created from another table has the field country id and the above dropdown datawindow is linked to this field.

The country table has country id 0 for "Inapplicable". When my primary window brings back data where the country id is null the drop down shows "Inapplicable" ! Somehow a null value in the country id field gets linked to the 0 value in the Country table. I have tried various things but can't figure out how this is happening. I inherited this application from someone who is no longer here. When I created my own country table and linked that to the dropdown dw it does not happen. But if I use the existing drop down with any thing else that I have created it does happen - so this makes me beleive that it is built into the drop down in some way !

Any clues - I'm really perplexed !
 
hi,
if i puzzle of this thing,i will put a command button:cb_1 on the primary window, and after the primary window brings back data where the country id is null and the drop down shows "Inapplicable" ,in the clicked event of cb_1,i will write as below :
________________________________________________________
String ls_countryid
ls_countryid = dw_1.getitemxxx(dw_1.getrow(),'country id field')
if isnull(ls_countryid) then
messagebox('','NULL')
else
messagebox('',ls_countryid)
end if
________________________________________________________

to see if the field's data value is really NULL,

1\IF NULL,the bug is in the dddw,
i will see the dddw's SQL SELECTE statement
if the dddw created from a view,i will see the view's SQL SELECT statement too.

2\IF NOT NULL,the bug maybe:before i set the countryid field in the primary datawindow ,NULL has converted into '0' somewhere .

my english is not well,hope it can be understood.
 
Is it possible to change the color of a particular line in the messagebox ? I want to show a warning message in Red within the message box.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top