Normal Topic Help With a Combo problum (Read 609 times)
drastixnz
Full Member
***
Offline


A Newbie....

Posts: 146
Location: New Zealand
Joined: Nov 29th, 2006
Help With a Combo problum
Jun 11th, 2007 at 2:41am
Print Post Print Post  
I want to place two vaules in to a combo box from a external db for example.

First:         John
Last:         Doe


I want to appare in the combo box as        Doe,John

Can i do this, or is this just another newbie wish.

Smiley Thanks in advance.
  
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Help With a Combo problum
Reply #1 - Jun 11th, 2007 at 3:17am
Print Post Print Post  
Sure can!

Here's how it can be done:

Code
Select All
Var vStr as String

vStr = @XLookupSourceListAll("Data\MyFileName.db", "/=", "MyFormName!Last", "Last;First")
vStr = @Replace(vStr, ";", ", ")
vStr = @Replace(vStr, @NL(), ";")

PopulateListElement(MyComboBox, vStr)
 



Replace "MyFileName.db", "MyFormName", and "MyComboBox" with the names of your file, form, and combo box element.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
drastixnz
Full Member
***
Offline


A Newbie....

Posts: 146
Location: New Zealand
Joined: Nov 29th, 2006
Re: Help With a Combo problum
Reply #2 - Jun 14th, 2007 at 6:37am
Print Post Print Post  
Thank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank You
  
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Help With a Combo problum
Reply #3 - Jun 14th, 2007 at 12:08pm
Print Post Print Post  
drastixnz wrote on Jun 14th, 2007 at 6:37am:
Thank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank YouThank You

You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome You'reWelcome  Smiley
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged