Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo box in a grid
Message
From
02/10/2002 11:20:17
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00705165
Message ID:
00706886
Views:
18
>Hi!
>
>Combo Bbox noe works great. I add then date field to the list in the when method.
>
>How do I check that the item i'm adding doesn't already exist?
>
>RC

It depends on rowsource how quickly you could do it.
-You could check combo elements in a loop :
lnColNumber = < col number where your unique values are >
with thisform.blah.blah.myCombo
  for ix = 1 to .ListCount
    if .List(ix, lnColNumber) = lcMyCheckVAlue && exists
     * do whatever
     exit
    endif
  endfor
endwith
-You could use ascan() if rowsource is array.
-You could use select directly or scan..endscan, locate etc. if rowsource was a SQL or something like that.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform