Normal Topic Change field into a Combo Box? (Read 997 times)
robwood_ok
Member
*
Offline


No personal text

Posts: 23
Joined: Jan 29th, 2004
Change field into a Combo Box?
Jan 29th, 2004 at 10:45pm
Print Post Print Post  
How do you change a field into a Combo Box?

I can not find a place in Property Editor to change a field into a Combo Box.

If I have to add a Combo Box with Layout Elelment Adder, how to I delete the exiting field Label and make the New Combo Box take on the already stored values in my original field?

     Robert
  
Back to top
 
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: Change field into a Combo Box?
Reply #1 - Jan 29th, 2004 at 11:41pm
Print Post Print Post  
The only method I know of changing an element type is to unfortunately delete the existing element and create a new one.

I believe you have to go into the Manage a Database section and delete the old element so that your combo box can take on the label of the old element.

Bah humbug indeed.

  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Change field into a Combo Box?
Reply #2 - Jan 30th, 2004 at 12:03am
Print Post Print Post  
Quote:
The only method I know of changing an element type is to unfortunately delete the existing element and create a new one.


True, but very easy.

Quote:
I believe you have to go into the Manage a Database section and delete the old element so that your combo box can take on the label of the old element.


Not true. Simply delete the text LE. Select "Combo Box" in the Layout Element Adder, set its label to whatever you want, and set its data source to the same field name the deleted text LE was using (It will be listed on the "Bind Element To" pulldown) - all in Layout Element Adder.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Change field into a Combo Box?
Reply #3 - Jan 30th, 2004 at 12:05am
Print Post Print Post  
You want to change text field to ComboBox and do not want to lose the data.  First we have to understand that data is stored in the database field and layout element is just displaying that data. What is more important is to know what it bounded to.

First thing you want to do is to find out the element that you want to change is bounded to,  write it down. This you can find out by looking into the property viewer other tab when that particular element is selected.

Once you have got that, delete that element.  Add a ComboBox and Bind (Bound to) it to the same field name that your deleted element was bound to.

By right clicking on new ComboBox you can enter your choice. Your data will not be lost as you are binding it to the same data.

I believe this should work.  To be sure, please backup your database in case something goes wrong.
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Change field into a Combo Box?
Reply #4 - Jan 30th, 2004 at 12:09am
Print Post Print Post  
oopsss....Mark responded before I posted mine. Better follow Mark.  I am a new kid on the block...... and Mark is a big gun.
  
Back to top
 
IP Logged
 
robwood_ok
Member
*
Offline


No personal text

Posts: 23
Joined: Jan 29th, 2004
Re: Change field into a Combo Box?
Reply #5 - Jan 30th, 2004 at 3:54pm
Print Post Print Post  
Thanks for the tips.  It worked after a couple of tries.  I deleted the Label and then created a Combo box and selected my field name from the bound to box.  The system did bind it to the data, but added a zero after the field name.  Since the original field name, without the zero, was referenced in programming, I got a programming error when I opened Sesame.  Went back to Designer, got rid of the added zero on the field name(which I didn't know about until this point), and now it works great. 

   Robert Wood
  
Back to top
 
IP Logged