1,426

(10 replies, posted in General)

Hello Eyeman,
Can you attach your project?
Derek

1,427

(7 replies, posted in General)

Scribtx,
Perhaps I was not clear in my previous post.
My screen shot was not suggesting something you should try - quite the opposite.
The screen shot was simply highlighting that you yourself had specified the 'distinct option' in the tablegrid column footer with a 'time' format that was incorrect (the column footer 'text' attribute is not the place to do that).
With reference to your original post, I have still not been able to reproduce any errors you describe with your project. 
Perhaps other users can try and see if they encounter the problem.
Derek.

1,428

(7 replies, posted in General)

Hi,
I had a look at your program but everything seems okay - I can't reproduce any error messages.
The only thing that seems unusual to me is the column footer setting literal - Formatdatetime(hh:nn tt) which doesn't seem to serve any purpose.
What exactly are you doing when the errors occur and what do the error messages say is wrong?
Derek

1,429

(7 replies, posted in General)

Hi,
Can you attach your project - hard to tell just from the screen shots what might be behind the error but it'd be unusual for simply quitting out of the 'update' form to cause any problem.
Derek.

Hi CDB,
I've never seen it done like that before but it's neat and compact.
Thanks.

1,431

(5 replies, posted in Russian)

Hi Agusecc,
Try it like this (see attached).
Derek.

Hi,
'cfphone' isn't missing because it doesn't actually exist (calculated fields don't get stored and are simply the temporary product of a calculation based on other (stored) fields, as mentioned in my previous post). 
A simple example would be actually storing someone's date of birth but their age is computed every time the program runs and made available as a calculated field.  When the program closes, their 'age' no longer exists (you could, of course, choose to actually store someone's age but it is data inefficient and will be wrong within 24 hours and so makes little sense).
And because calculated fields don't actually exist, you can't reference them in an sql query (for the same reason, you can't reference a calculated field in another calculated field either).
If you need to reference the same piece of information in an sql query, you simply need to replicate the syntax of the calculated field in your sql query 'select' statement (as you've described in your post).
Hope that clarifies things rather than confuses - LOL!
Derek.

Hi CDB,
Can you do it something like this? (I don't bother to put the date into the tablegrid initially because it gets put there after the sqlupdate anyway).
Derek.

Hi CDB,
Try inserting
  if acol = 5 then............ should do the trick and limit anything to just that column.
I'm not sure why you just can't click on Column4 directly and do your date manipulation (ie if acol = 4 then........) rather than using an extra column with a checkbox - just a thought.
Attached is also something I did a couple of years ago which does a bit of 'interactive' grid work - perhaps it will give you some ideas.
Regards,
Derek.

Hi JoshuA,
Welcome on board!
As always with MVD, there are different ways to do it.
I'd suggest using a calculated field configured to use the same display format as you've defined for your phone number on your data input form, which then gives you
1.  The data input form uses the display format you defined.
2.  The tablegrid uses the calculated field.
3.  The report uses the calculated field.
4.  The database stores the phone number unformatted.
Calculated fields are set up as part of your database table definitions but don't actually get 'stored' - they exist only while your program is running.
Please have a look at the example and give a shout if anything isn't clear.
Derek.

1,436

(6 replies, posted in General)

Hi CDB,
I ran your project on older versions of MVD (back to 5.1) and the same problem was happening, so I don't believe it's a 6.2 issue.
I then changed most of the properties you'd set up against datetimepicker1 and it made no difference.
In the end, I deleted the field and then added it back and the problem corrected itself.
I have found when I've been making lots of changes to a form, that something odd might occur (but I would stress that it's extremely rare).  In those instances, I've just backed out the changes I've made and that's always fixed things. 
Regards,
Derek.

Hi,
Perhaps you could try doing it like this (please see attached).
Regards,
Derek.

1,438

(6 replies, posted in General)

Hi CDB,
I've just mocked up a quick test (1 form, 1 page control, 3 tab-sheets, different types of objects placed on all 3 tab-sheets) and I've not hit any problems using MVD 6.2.
If you upload your project, I can see if I can replicate the problem.
Derek.

1,439

(10 replies, posted in General)

Hi,
I've not been able to see anything obvious and the error message isn't all that helpful. 
I think this is a question for Dmitry.
The only other course of action might be to use an earlier version of forms.xml, but depending on the number of changes you've made recently, I don't know how realistic this is.
Derek.

1,440

(10 replies, posted in General)

Hi,
Can you upload the whole project (without the .exe) and I'll try and have a look.
I seem to recall having a similar problem a couple of years ago - not sure I can remember if / how I fixed it though.
Derek.

1,441

(2 replies, posted in General)

Hi,
If you can zip your project  (without the .exe) and upload it,  then someone in the Forum should be able to take a look and get back to you.
However, as an option, I'd suggest you change the processing logic slightly - instead of adding a new employee DIRECTLY from the workcard form, go via a form that shows all employees with the option to add / change / delete employees from there.  This removes the original issue (empty row) but also has 2 additional benefits;
1) you can now use the same form to not only add but also change and delete employees (not sure how you'd otherwise planned to do that)
2) it's now not possible to create a work card with a blank employee, so it is more rigorous without having to write any additional code.
Please see the attachment.
Regards,
Derek.

Hi,
Yes, you can remap any keys you want.
For function keys, please have a look at the attached example (Fkey codes are in the script).
Regards,
Derek.

1,443

(5 replies, posted in General)

Hi,
Your syntax is correct.
Have you created an 'onchange' event for form1.edit1? (please see the screenshot in the attachment).
Regards,
Derek.

1,444

(5 replies, posted in Script)

Thanks Hedan and best wishes for 2020.
Derek.

1,445

(5 replies, posted in Script)

Hi Jean,
No - I had a choice between replying to Hedan's question or going Christmas shopping with the grandchildren - it was no contest!!  smile
Merry Xmas to you too.
Derek.

Hi Pnoindl,
Please have a look at the attached example.
Form1.tablegrid1 shows your invoice headers.
Form1.tablegrid2 shows your invoice lines related to the invoice header row that has been highlighted
The way you link the two tablegrids is by using a button defined with a 'search' action (in my example, this is button4).
Button4 uses form1.tablegrid1 as its search criteria - in other words, whichever row is highlighted in tablegrid1 will display the related child records (invoicelines) in tablegrid2 when form1.button4 is clicked.
To make it more user-friendly, button4 can be hidden and automatically clicked (an 'incremental search'), whenever a different row in form1.tablegrid1 is highlighted - see the screenshot in the attachment to see how this is done.
This is standard MVD functionality and needs no script.
Regards,
Derek.

1,447

(5 replies, posted in Script)

Hello Hedan,
I think you can change the combobox to pretty much anything you want with a combination of
form1.combobox1.color := xxxxx
and
form1.combobox1.font.color := xxxxx
For the datetimepicker, I think it's only possible to change the background color (and that needs to be done at 'form1.show' rather than being able to set it as part of the datetimepicker object properties.
Please see the attached where I was just messing with different combinations - it might give you some ideas.
I also seem to remember that not all background / foreground color options are available depending on the Operating System that you're using (but I might be wrong!).
Regards,
Derek.

Здравствуй Tefix,
Добавьте это в конце вашего sqlquery -
order by 2;
Вы также можете использовать -
order by tablename.fieldname;
Другие варианты -
order by 2 desc;
order by tablename.fieldname desc;
Возможно, это помогает?
Derek
(с гугл переводчиком)

1,449

(3 replies, posted in General)

Hi Scribtx, Hi JB,
If I don't want to use the pre-set colors (clred, clblue, clgreen etc), I click on the bgcolor object property (the very small box circled in the attached screenshot - it's quite easy to miss - LOL!), click on 'define custom colors' and then just choose a color from the palette.
The color value is then copied back into the object's property (in my example $00B6AA85).  You can then simply copy this value and use it elsewhere if required.
All of this holds true not just for form backgrounds but for labels, tablegrid backgrounds, panels etc etc.
Regards,
Derek.

1,450

(2 replies, posted in FAQ)

Hi George,
Not sure why Dmitry's example didn't work for you (it's good for me) but attached is an example with a few keys mapped to certain actions (I use CTRL+ALT to avoid any conflicts that you might get with just CTRL+ or with just ALT+ but the decision is yours). 
CTRL+ALT+H displays what short cut keys have been set up.
Derek.