Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Box Help
Message
From
14/01/2005 04:46:34
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00976758
Message ID:
00977088
Views:
17
Dear Bianca,

Since I d/l data from SQL server, I have 2 combobox, one for selecting the time period, the second one is to select the status...I used

cSQL = "Select * from inventory where status = ?lcStatus and orderdate > ?lcDate"
SQLEXEC(cSQL,gnconnect,table1)

In this way, the data can be refresh.

Concerning the combobox selection... I got a table

LOG_STATUS
cStatus lcStatus cLevel
Delete 0 9
Ordering 1 1
Procuring 2 2
Approving 3 3
Delivering 4 2

whereas 1=Every User; 2=Procurement Officer; 3=Procurement Manager; 9=Administrator

In case you just want to show those orders enabled by Procurement Officer
"Select * from log_status where cLevel <= 2 into cursor tmp_status order by lcStatus"

TMP_STATUS...
Ordering 1 1
Procuring 2 2
Delivering 4 2

So Setting the rowsource to 2 "Alias", by selecting different cStatus, I have different lcStatus for displaying orders, since every user should belong to some groups, more complex can be using logic of 1,2,4,8,16,32,64 e.g.
cLevel=3 means it has the power of level 1 and level 2;
cLevel=7 means level 1, level 2, level 4


Hope this work for you
Best regards,

Aaron Chu

********************************************************

Working with Visual FoxPro is a lot of FUN!

********************************************************
Previous
Reply
Map
View

Click here to load this message in the networking platform