5,951

(4 replies, posted in Script)

mathmathou
May be this example will be useful for you, search directly in ComboBox:
http://myvisualdatabase.com/forum/misc. … download=1

Sid.Killsayd
Скачайте пожалуйста данный проект в качестве примера
http://myvisualdatabase.com/forum/misc. … download=1

5,953

(8 replies, posted in Script)

tcoton
Please attach your project.

v_pozidis wrote:

ok but , can anyone send me an exaple to understand how to do that ?

Example for you:

5,955

(29 replies, posted in General)

The fixed project.

5,956

(2 replies, posted in Russian)

Используйте для этого событие грида OnChange.
Нумерация колонок начинается с нуля, поэтому Form1.Grid1.Columns[32].Visible:= False; скроет 33 колонку.


строка Form1.Grid1.dbUpdate; не нужна.

5,957

(29 replies, posted in General)

In your attached project there is no this code, please attach actual your project.

5,958

(8 replies, posted in Script)

tcoton
Because when you click button 2, component Data_edition.Edit_SIMNr is disabled from previous pressed of button1

try this code:

procedure Data_Edition_OnShow (Sender: string; Action: string);
begin // First Tab + 1st button

     Data_edition.Edit_Tariff.Enabled := Data_edition.Tag<>1;
     Data_edition.Button1.Enabled:= Data_edition.Tag<>1;// button save
     Data_edition.Edit_IMEI.Enabled:= Data_edition.Tag<>1;
     Data_edition.Button2.Enabled:= Data_edition.Tag<>1;// button save
     Data_edition.Combo_IMEI_Sttus.Enabled:= Data_edition.Tag<>1;// Combobox
     Data_edition.Edit_SIMNr.Enabled:= Data_edition.Tag<>1;
     Data_edition.ComboSttus.Enabled:= Data_edition.Tag<>1;// Combobox
     Data_edition.Button3.Enabled:= Data_edition.Tag<>1;// button save
     Data_edition.Edit_CC.Enabled:= Data_edition.Tag<>1;
     Data_edition.Edit_Resp_CC.Enabled:= Data_edition.Tag<>1;
     Data_edition.EditDesc_CC.Enabled:= Data_edition.Tag<>1;
     Data_edition.Button4.Enabled:= Data_edition.Tag<>1;// button save
     Data_edition.Edit_Dev_type.Enabled:= Data_edition.Tag<>1;
     Data_edition.Edit_Dev_make.Enabled:= Data_edition.Tag<>1;
     Data_edition.Edit_Dev_model.Enabled:= Data_edition.Tag<>1;
     Data_edition.Button_save_devices.Enabled:= Data_edition.Tag<>1;// button save
     Data_edition.Grid_DeviceList.Enabled:= Data_edition.Tag<>1; // Grid
     Data_edition.Grid_CC_List.Enabled:= Data_edition.Tag<>1;    // Grid
    
     if Data_edition.Tag = 1 then Data_edition.Edit_VodafNr.SetFocus; // Set Focus on textbox

     // Second Tab
     Data_edition.Grid_TariffList.Enabled:= Data_edition.Tag<>1;    // Grid
     Data_edition.GRid_VodafNbrsList.Enabled:= Data_edition.Tag<>1;    // Grid
     Data_edition.Grid_SIMLIst.Enabled:= Data_edition.Tag<>1;    // Grid
     Data_edition.Grid_IMEIList.Enabled:= Data_edition.Tag<>1;    // Grid

     // Second button
     if Data_edition.Tag = 2 then Data_edition.Edit_SIMNr.SetFocus;
     // Third button
     if Data_edition.Tag = 3 then Data_edition.Edit_IMEI.SetFocus;
end;

5,959

(29 replies, posted in General)

I see that you commented this line (attached project without commented this line):

//sHello: string; 

You should to comment and this line (first line in your code), because after keyword var variables must be declared:

var

5,960

(4 replies, posted in General)

There is no different to use DateTimePicker or TextBox for filtering records, you should have database field with DATE type and put a Search button on a form.


Just see first video lesson
https://www.youtube.com/watch?v=XffrXjr3qKs


where you can find filtering by date (date of birth)

5,961

(5 replies, posted in Script)

prahousefamily
You can't encrypt sqlite.db but you can delete script.pas, after that project will work but user can't open project in MVD to see code.

5,962

(29 replies, posted in General)

roger wrote:

Enclosed, but now I have cleaned up other code in order to try fixing the problem. I just got worse.

I don't get any error messages in your project, how to reproduce the error?

5,963

(12 replies, posted in Russian)

Роман
Это можно реализовать с помощью вычисляемого поля
(CASE WHEN realvalue>=0 THEN 1 WHEN realvalue<0 THEN 0 ELSE NULL END)


затем на форме расположить CheckBox и присвоить ему данное выч. поле с помощью свойств TableName, FieldName
также данный CheckBox необходимо добавить в настройки кнопки Поиск.

5,964

(3 replies, posted in Russian)

memult wrote:

Если не сложно, скиньте пример подключения к mysql по скрипту.

http://myvisualdatabase.com/forum/viewtopic.php?id=1804

5,965

(131 replies, posted in Russian)

Form1.Edit2.Font.Color := clRed;

5,966

(29 replies, posted in General)

roger
Please attach your project (zip file without exe and dll)

5,967

(8 replies, posted in Script)

You can't change color of border, you can change only style of border.

5,968

(29 replies, posted in General)

roger
Menu present only on Main form, do you have menu on another form?

5,969

(8 replies, posted in Script)

You can't set focus for invisibles components. (limitation by OS Windows)


To set focus, you should use event OnShow for Form2 and small hack )

// several button new record
procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
    frmEmployee.Tag := 1;
end;

procedure Form1_Button2_OnClick (Sender: string; var Cancel: boolean);
begin
    frmEmployee.Tag := 2;
end;

procedure Form1_Button3_OnClick (Sender: string; var Cancel: boolean);
begin
    frmEmployee.Tag := 3;
end;

procedure frmEmployee_OnShow (Sender: string; Action: string);
begin
    if frmEmployee.Tag=1 then frmEmployee.edFistName.SetFocus;
    if frmEmployee.Tag=2 then frmEmployee.edLastName.SetFocus;
    if frmEmployee.Tag=3 then frmEmployee.edComment.SetFocus;
end;

5,970

(12 replies, posted in Russian)

1.
закрыть форму Form3 получиться только при закрытии формы Form10.
для формы Form10 создайте событие OnClose

procedure Form10_OnClose (Sender: string; Action: string);
begin
    Form3.Close;
end;

2. Для кнопки удаления записи создайте событие OnAfterClick

procedure Form1_Button5_OnAfterClick (Sender: string);
begin
    Form1.Button8.Click;
end;

5,971

(6 replies, posted in Russian)

memult wrote:

Также еще небольшой вопрос по программе, в плане оформления шапки TableGrid.

Используйте свойство HeaderStyle в инспекторе объектов (свойство введено начиная с версии 2.2)



memult wrote:

Также, при прикреплении файла в соответствующем поле и после его удаления от туда, либо после удаления записи целиком, размер БД не уменьшается. Это можно как то избежать?

Это особенность любой базы данных, это место будет позже использовано для новых записей, также вы можете принудительно сделать "дефрагментацию" базы данных например с помощью бесплатной утилиты SQLite Studio (в меню: Databases > Vacuum)

5,972

(6 replies, posted in Russian)

memult
На счет экспорта в Word из SQLite.
Для SQLite есть ODBC драйвер ( http://www.ch-werner.de/sqliteodbc/ ), попробовал сделать вставку Поля в Word используя источник данных (User DNS), но к сожалению при подключении Word пишет ошибку "Не удалется получить список таблиц из источника данных"

5,973

(11 replies, posted in Russian)

Покажите пожалуйста код, который раскрашивает ячейки в желтый цвет.

5,974

(21 replies, posted in Reports)

abouyahya527911
Unfortunately I don't quite understand the questions, please attach your project with info, where are located these problems.

5,975

(4 replies, posted in General)

Do you mean, to filter records in TableGrid by date selected in DateTimePicker ? Or sorting by date?