Topic: Dropdown option

I need a drop down option when i enter any input through gui to database, How to achive this?
Please help,

Re: Dropdown option

Using by script, you can activate this option:

Form1.ComboBox1.Style := csDropDown;
Dmitry.

Re: Dropdown option

I already made a dropdown option. How can i enter data on it? It shows blank data. Thanks.

Re: Dropdown option

ramonjrtan
what is your goal?


You can't directly enter text to ComboBox for save it in database.
But I think it can be done with a script.

Dmitry.

Re: Dropdown option

DriveSoft wrote:

ramonjrtan
what is your goal?


You can't directly enter text to ComboBox for save it in database.
But I think it can be done with a script.


the goal is i will be able to add a name and after it will appear in the dropdown list. thanks..

Re: Dropdown option

ramonjrtan


I made example for you, please, download here:

Post's attachments

Attachment icon Employees ComboBox add value.zip 7 kb, 889 downloads since 2014-10-27 

Dmitry.

Re: Dropdown option

thank you this is very helpful.

Based from your attached example, I checked the checkbox NOT NULL in Employess(lastname and firstname). In Employee form i clicked OK button and there is an error "NOT NULL constraint failed:employees.lastname." Can there be a message that says "Please enter correct data" or "Enter Last Name/ First name" instead for that error?

Thanks...

Re: Dropdown option

ramonjrtan
Yes, you should create event "OnClick" of button with action "Save Record", where you can make check.

procedure Form2_Button1_OnClick (Sender: string; var Cancel: boolean);
 begin
    if frmEmployee.edLastName.Text='' then
    begin
       ShowMessage('Enter Last Name.');
       Cancel := True;
       Exit;
    end;


 end;

If you are experiencing difficulties, please, send me your project to support@drive-software.com
I'll try to help you.

Dmitry.

Re: Dropdown option

DriveSoft wrote:

ramonjrtan
Yes, you should create event "OnClick" of button with action "Save Record", where you can make check.

procedure Form2_Button1_OnClick (Sender: string; var Cancel: boolean);
 begin
    if frmEmployee.edLastName.Text='' then
    begin
       ShowMessage('Enter Last Name.');
       Cancel := True;
       Exit;
    end;


 end;

If you are experiencing difficulties, please, send me your project to support@drive-software.com
I'll try to help you.

thank you. i will send my project if ever i will be needing big help.

i have a question. is it possible to make something like the attached file. something like schedule.

Post's attachments

Attachment icon sample.jpg 68.63 kb, 343 downloads since 2014-11-03 

Re: Dropdown option

Unfortunately in the current version it is difficult to develop.

Dmitry.