Hi Eyeman,
It's not the script.
If you have a look at the raw data (screenshot1 in the attachment) you can see the 'null' values.
So I suspect the problem is with the 'save' button on AA_Form_007_OPD_VISIT_REC not saving editcounter1 (look at screenshot2.jpg).
Derek

Hello,
Your application doesn't close completely because the login form is only hidden (AA_Form_001_LOGIN.hide - see line 71 in the script).
The easiest fix is to create an 'on close' event for AA_Form_002_SELECT_MODULE and insert the instruction  AA_Form_001_LOGIN.close;  in the script (see attached screenshot). 
So now, when AA_Form_002_SELECT_MODULE closes, it automatically closes AA_Form_001_LOGIN at the same time;
Derek.

Hi,
AA_Form_007D_OPD_VISIT_REC_MENU neither receives any data nor passes any on, so it breaks any relationships that MVD maintains automatically for you.  You could manually obtain the necessary keys by script but it's not playing to MVD's strengths.
I understand what you are trying to achieve using a 'menu' form to keep AA_Form_007_OPD_VISIT_REC uncluttered but I think a better approach might be to use a page control with a number of tab sheets (one tab sheet for each of your menu items).  This keeps the relationships intact and should then result in only the relevant child records being displayed in the tablegrid in AA_Form_006_PATIENT_REG_REC which was your original concern (see the attachment as a suggestion).
However, for information, there are a number of points that I would mention.
1.  When you close your application, it stays running in the background - this is due to the way you use your login form, I suspect.
2.  I would probably question any application that has 107 tables and 141 forms - I don't fully understand your requirement but I'd have a rethink of the data structure.  In my experience, if that's not correct then it's never going to work properly.
3.  With such a large number of tables and forms, I would also be worried about how slow your application will run once you have some meaningful data loaded and, I'm presuming from the nature of what you've done, it will be multi-user as well.
Anyway, that's just my opinion and you and others may have a different view.
Hope this helps,
Derek.

Hi,
It's hard to work out exactly what's going on although it does sound like one of the keys is either not being passed through or not being saved.
Can you attach the latest version of your project and I'll try and have a look.
Derek.

Здравствуй Rasnikgal,
Я изменил ваш sqlquery.
Это помогает?
Derek.

1,481

(13 replies, posted in Database applications)

Hi,
Yes, you've got it.
Derek.

1,482

(13 replies, posted in Database applications)

Hello Eyeman,
The data structure defines a one-to-many relationship between 'clients' and 'bills'. 
The form 'frmservice' can only be accessed through 'frmclient' which already knows the clients.id.  Therefore, when the form 'frmservice' is opened, clients.id is passed through and used to automatically generate (and save) the foreign key (bills.id_clients) without you having to do anything. 
This is 'standard' MVD functionality and one of its main strengths.
Derek.

1,483

(1 replies, posted in Russian)

Возможно, так
Derek

1,484

(54 replies, posted in Russian)

Привет Vit007,,
Возможно, так
Derek.

Hi Eishaalkashif,
The format of fields in the 'edit form' is not necessarily the same as how they are formatted in the tablegrid;  this is intentional as you might want to see information displayed differently (for example, you might what to see values displayed as whole amounts in the tablegrid but want to see it displayed to 2 decimal places in the edit form,  or a date shown in short-format in the tablegrid but in long-format in the edit form etc).
To format dates in the grid, please see the attached example.
Also, please see how you can use hints against specific columns and specific cells just by clicking on a cell.  For example, in Column 0, it takes the specific value in that cell and combines it with an sql call to retrieve some extra information to display as a hint.  Hints against the other columns are specific to the entire column
Hope this helps,
Derek.

Попробуйте это так

Hi Stas.kodpi,
"Vform" - это локальная переменная, которая временно хранит отдел, к которому принадлежит выбранный пользователь.
В зависимости от выбранного пользователя значение в "vform" решает, какую форму следует открыть (если пользователь принадлежит отделу "sales", открывается форма "sales", если пользователь принадлежит отделу "research", открывается форма "research" и т. Д.). ).
Formlogin.combobox1.dbItemID: = -1 и formlogin.edit1.text: = '' очищает 'formlogin', так что новый пользователь не может войти с учетными данными предыдущего пользователя.
Derek.
.
'Vform' is a local variable that temporarily stores the department that the selected user belongs to.
Depending on the selected user, the value in 'vform' decides which form should open (if the user belongs to Department 'sales' then form 'sales' opens, if the user belongs to Department 'research' then form 'research' opens etc).
Formlogin.combobox1.dbItemID:= -1 and formlogin.edit1.text := '' clears the 'formlogin' so that a new user cannot logon with the previous user's credentials.

Здравствуй,
Вы могли бы сделать это так.
Я использую его с экраном входа, но он работает где угодно.
В этом примере только пользователи в отделе «admin» могут обслуживать пользователей.
Пароли совпадают с именами пользователей.
Возможно, это помогает.
Derek.

1,489

(4 replies, posted in General)

Hi Terry,
If you don't want to see countries / locations that haven't been visited, it's probably better to use an sqlquery rather than calculated fields - have a look at the attachment as a possible alternative approach.
In this example, you can click on a trip no' (left hand grid) or a country or location (right hand grids) and the relevant details are retrieved.  I've not tested it (apart from checking it compiles!) so be warned - LOL!
I'm not sure what it will make of a trip that covers more than one country, but even if it falls down, the approach might still give you some ideas.
Regards,
Derek.

1,490

(4 replies, posted in General)

Hi Terry,
Not sure if you have a specific requirement for a summary table but if not, then I'd keep it simple and hold any summary information against country and location lookup tables as calculated fields (hope I've explained that correctly!).
Anyway, please have a look at the attached and hopefully it helps.
Derek.

1,491

(1 replies, posted in Russian)

Здравствуй,
Если я понимаю ваш вопрос, возможно, вы можете сделать это так.
Вы можете либо скрыть кнопку, либо отключить ее.
Я добавил вторую кнопку только для проверки программы. Когда вы удовлетворены тем, что делаете то, что вам нужно, вы можете удалить вторую кнопку.
Derek.

Пожалуйста, смотрите скриншот.
Derek.

Привет,
Это помогает?
Смотрите также скриншот.
Derek.

1,494

(6 replies, posted in Script)

Hi There,
Is this the sort of thing you're after (see attached)?
Regards,
Derek.

Здравствуй Guitar-craft,
Вот два примера для вас.
Надеюсь, это поможет.
С уважением
Derek.

1,496

(6 replies, posted in Russian)

Hi Nrmuduli,
Thanks for the link - QIconChanger seems a much better option that the ones I'd looked at.
Derek.

Hello Katana,
There are a few different ways in which you can achieve this using MVD, and they can be as straightforward or as feature-laden as you want.
But at its simplest, please see the attached as an example.
Derek.

1,498

(17 replies, posted in General)

Hi Lejoso,
I understand that some elements of code (but not all) are usable in both SQLite and MySql without needing to be amended.
But unfortunately, I don't use MySql at all so can't say why you don't get the same result and what exactly the problem is.
Derek.

1,499

(2 replies, posted in Russian)

Привет Maksim,
Попробуйте это так. Также смотрите скриншот во вложении.
С Уважением,
Derek.
(с гугл переводчиком)

Hello Agusecc,
Perhaps try it like this (see attached).
But because you want to have the formatting displayed 'real time', I think you also need to hold the value without it's formatting (form1.edit3 - hidden).
Both fields need to be saved to your table (form1.edit2 as the formatted version and form1.edit3 as the unformatted version which you would need to use if you need to perform calculations).
I haven't allowed for formatting > 99,999,999 nor have I allowed for reworking the formatting when a number previously entered, is reduced (but it's much the same logic).
Regards,
Derek.