Topic: Enter fields

heloo again,
it's posible in a form white:check boxes,input's,combobox....when one is not selected on not entered a text in input ,when i hit the Ok button or Save button, to not let me save it until all the checkboxe's and inputs are filed?

Re: Enter fields

You can create NOT NULL fields to prevent enter empty values.


Also you can do it using script, for that you should create event OnClick for button "SaveRecord"
example:

procedure Form2_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
    if (Form2.Edit1.Text='') or (not Form2.CheckBox1.Checked) or (Form2.ComboBox1.dbItemID=-1) then
    begin
        ShowMessage('Please fill all fields.');
        Cancel := True;
    end;
end;
Dmitry.

Re: Enter fields

thanks work's fine!