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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field labels...

Status
Not open for further replies.

hudhwk

Programmer
Jan 28, 2003
80
MX
Hi guys,

Here I am again.

I was wondering how can I use field labels instead of regular field names in a List Control where I select that it is filled with table structure. I already assign them in the structure description of the table.

Any idea? Thanks in advance.

Sincerely,

Daniel Buentello
"Here comes the hawk!
 
You'll just have to build an array (or add the items) manually for the listbox (there isn't a "canned" option for what you want). You can get the field caption using DBGETPROP() with the field option.

Rick
 
Hi Rick,

Thanks for your response.

You know I've been trying to solve this but the function is giving me a lot of headaches I have something like this:

test=DBGETPROP("mae_cc.fol","FIELD","CAPTION")

And it gives me the error of "invalid number of arguments" or something like that (because I have a Spanish version of VFP).

Am I doing something wrong?

Thanks in advance.

Sincerely,

Daniel Buentello
"Here comes the hawk!
 
Indeed the format is right - it almost matches the Help file example of:
Code:
* Displays comments for the field 'cust_id'
cResults = DBGETPROP("customer.cust_id", "Field", "Comment")
Is the database that holds the mae_cc table currently open?
What version and SP of VFP are you using?

Rick


 
I just tried the following in VFP 6.0 SP5, 7.0 SP1 and 8.0 SP1 and it worked in all of them. (Note: It's a VFP 8.0 DBC, but I'm not using anything that's "new" to 7 or 8).
Code:
open database epiccust
?DBGETPROP("users.int_id", "Field", "Caption")
Rick
 
If I do a simple use of the table it doesn't work, but if I do the open database first and the do the dbgetprop, then it works perfectly.

Thanks a lot Rick!!!

Daniel
"Here comes the hawk!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top