(2 replies, posted in General)

In the Object Inspector for your SAVE button, uncheck the DEFAULT checkbox.


(2 replies, posted in Script)

You can also you use SQLQUERY on a button action.


(20 replies, posted in General)

I cannot replicate your problem with both rtf and images. I added records with rtf's. Then go back and added images. I did various combinations and the scrolling shows both the image and rtf just fine. I'm on version 6.3. Don't know if that has anything to do with it.


(7 replies, posted in General)

You need to include the cboState field in the SAVE RECORD action of your SAVE button. It's an easy oversight even for veteran developers.


(3 replies, posted in General)

I resolved this issue. I emptied the tables and it worked fine. There was something in the import which must have caused the error. It was only test data that was imported and I didn't have the time to try to figure out why MVD didn't like the imported data. Everything is good now and the production version is working fine.


(1 replies, posted in General)


1.- That the import from an excel that is in the form1 can have it in the forminicio page tab colima

Not sure what you mean here. But since we don't have access to your MySql database we'll have to try to test with Sqlite. Do you have a copy of your Excel spreadsheet that you can upload for us to use.

2.-My project does not request the connection data to mysql, every time I try to test it asks for the connection data.

You can connect through script by doing the following:

procedure Form1_OnShow (Sender: string; Action: string);

     {$MySQL disable_connectdialog}
     Form1.MySQLConnection.Server := '';
     Form1.MySQLConnection.Port := 3306;
     Form1.MySQLConnection.Username := 'root';
     Form1.MySQLConnection.Password := 'root';
     Form1.MySQLConnection.Database := 'mvd';

         ShowMessage('Can''t connect to database.');

     if Form1.MySQLConnection.Connected then
         UpdateDatabase(''); // to fill ComboBoxes
         Form1.GridEmployees.dbUpdate; // if you have TableGrid on first form with option "Enable auto execution", you should call method dbUpdate manually

3.- know if it is possible to eliminate the start menu or remove the about and other menus at the top.

To remove the standard menus in MVD you can use the following script:

Form1.mniFile.visible := false;
Form1.mniClose.visible := false;
Form1.mniOptions.visible := false;
Form1.mniSettings.visible := false;
Form1.mniReport.visible := false;
Form1.mniExportData.visible := false;
Form1.mniImportData.visible := false;
Form1.mniAbout.visible := false;


(7 replies, posted in General)

A relationship needs to be established between contacts and states so the combobox can be used as a lookup. Also, the tablegrid needed to bring in the state name from the state table. Fixed project is attached.


(2 replies, posted in General)

According to Dimitry the new versions of Windows does not allow you to change the color of buttons and checkboxes. For checkboxes what I do is clear the caption in the checkbox properties and then insert a label next to the checkbox. Then you can make it any color you want. Doing it this way, you can place the label on either side of the checkbox.


(11 replies, posted in SQL queries)

My apology. I see two errors in my statement. Change the second formatter to 'YYYY-MM-DD'. I was missing the 4th Y and it should be single quotes around it.


(11 replies, posted in SQL queries)

Dates in databases are stored in the YYYY-MM-DD format so you need to reformat your datetimepickers in that format.

form1.Edit1.Text:= SQLExecute('Select Sum(svalue) from Sale Where Date(Date1) >= "' + FormatDateTime('YYYY-MM-DD',Sale.datetimepicker1.DateTime) + '" and Date(Date1) <= "' + FormatDateTime('YYY-MM-DD'',Sale.datetimepicker2.DateTime) + '"');


(11 replies, posted in General)

Welcome aboard. No need to abandon MVD. It can handle most any situation. What you want to do is quite simple. See attached project for an example of what you are trying to do. It is a very simple setup. MVD gives you various ways to show/update info. But as far as the database relationship, you should set the relationship on the child table (addresses) pointing to the parent (users). Click on dbschema button in the database tables tab to see how the relationship is defined.

Hope this helps. If you have any other questions, don't hesitate to ask. There are many people on here to assist.


(5 replies, posted in General)

Sounds did not work because you didn't have any code to play any sounds. I created a sound folder and put a sound in there. Code was inserted to play a sound when the task reminder time arrives.


(5 replies, posted in General)

I didn't look into that part of it. I only concentrated on the popup message part. I'll take a look at it. Probably tomorrow sometime.


(5 replies, posted in General)

Revised project attached. I changed you timer procedure a little. One thing was your date comparison needed to compare date format as 'YY-MM-DD'. You have the option to pick an alternate message so I put in a check for the alt text to be displayed if the checkbox is checked. Also, you need to be able to check for an alert notification for a task if the date/time has passed while the program is not running. So if a date and time has passed when you start the program you will get a notification immediately. And finally, you need a way to shut off the reminder otherwise you will get notified every second. So I put in an update to set the reminder datetime to null after notification.

I also put in a doubleclick procedure for the tasklist tablegrid in order to be able to edit from the tablegrid. This may be needed if you have overlapping tasks.


(3 replies, posted in General)

I think this may be a question for Dimitry. I created an MVD project using a MySql database. It works fine on my localhost. I uploaded the database to an online service. My app connects to the online database just fine, but I get the attached error message. It shows that the table does not exist, but it does. PhpMyAdmin shows that the tables are definitely in the online database with all the data. The database name is "sql9353369" and it looks like MVD appends it to the tablename. Any idea what the cause and solution? Thank you in advance.


(26 replies, posted in General)


First we can create more than two field on category table?

Yes you can add any number of fields.

We can add 'service' field?

Yes you can add Service field. I'm not sure what it means or how it is to be used, but you can define it on a table.

how can we add Grand Total, discount

You can add discount to the Sales Ticket and have a calculation to subtract it in the Sales Ticket form.

receivable and balance

The short answer is YES. However, you are getting into more sophistication in your project. It seems like what you were putting together was a simple Point-of-Sale project with the ability to report on profit and losses on sales. But now when you mention "receivables and balance", you will need to incorporate more data tables and processes. If you want to maintain receivables and balances of what is owed, you will now need to define a Customer table and probably an invoice table, at minimum, and of course new forms and reports to take care of the processes. This all can be done in MVD, however my time is limited on the forum. If you can elaborate more on the design of your total application, I will try to put something together for you to at least get you headed in the right direction, but I can't guarantee my time. Piecemealing little bits at a time is not good for an efficient application development. Things like I mentioned in my last post with the dates in two different tables is not good database design. This kind of thing can happen when a design is not totally in place or known. Maybe you do have it all designed and I just do not know it. It just makes it more difficult on this end to come up with good solutions.


(26 replies, posted in General)

In order to group multiple sales items into a single sale I created another table called Sales_Tickets. Each ticket can have one or more items sold. I included a print for each ticket. However, I know nothing about thermal printers, but I would assume that the report can be printed directly onto a thermal printer if it is attached to the computer/network you are using for your project.

As a footnote, since the sales items include a date, I put in script to keep the sales items date in synch with the sales ticket date. The sales items date probably should be removed and only use the sales ticket date. I did not remove it because I didn't want to interfere with the already defined income / expense forms and summaries. Not enough time on my part to redesign it. Hope this helps.


(2 replies, posted in General)

The timetable tablegrid can only show two overlapping appointments in an hour time slot. You can have more than one appointment at the exact same time (not sure how that is humanly possible - lol, just kidding), but you will only see one in the timetable tablegrid. You can see that there is at least one appointment, but you can't split the cell to show the other ones. You can however see the multiple appointments in the appointment list (tablegrid2). I did modify the project to allow you to maintain the appointments from the appointment list for those situations where you might have multiple same time appointments. You can double-click in the appointment list to edit and right click to delete. I hid your edit and delete buttons because they are only used for the timetable tabelgrid (tablegrid1) and not the appointment list tablegrid (tablegrid2). They are activated by double clicking or right-clicking in the timetable tablegrid. The add button remains as is.


(26 replies, posted in General)

A form can only update one record selected from a tablegrid at a time. By having the same fields defined on the form will only show the same data multiple times. I'm not sure what you are trying to do. Maybe you can explain a little more what you want to accomplish.


(4 replies, posted in Reports)

The fixed project is attached. I removed "tablegrid1" from the Report Search. When included in the search the report will only report out the highlighted product in the tablegrid. When you add products it will automatically highlight that product in the tablegrid and therefore will only print that item. Removing the tablegrid from the search will print all items in the tablegrid.


(8 replies, posted in General)

derek and v_pozidis,
Attached is another option for an additional idea. The project I used came from Dimitry on the forum some time ago. I modified it slightly to include a tablegrid (tablegrid2) of the tasks just to see all the events in one place. You can click on a date on the calendar or click on a task in the task list to adjust the calendar and see the next 7 days of events and times in tablegrid1. It might not be what you exactly want, but it may give you a start.


(5 replies, posted in General)

Haven't seen Dimitry on here for awhile and now the forum is getting spammed. Does anybody know what is going on. Hope he is not sick.

Try the following. I think your quotes may be your trouble.

sqlexecute('UPDATE orders SET id_productSupplier =  '+dbx+ '  WHERE id = '+idx);


(6 replies, posted in General)

If you have fields already defined on the form and then you decide to insert a panel on the form, you cannot just move the fields onto the panel. You need to select all the fields you want on the panel, then do a cut and paste onto the panel. Once you do a paste onto the panel, all the fields will still be selected so you can then move them around the panel. Make sure that your panel is large enough to hold all the fields. You can always downsize the panel once you have the fields where you want them on the panel.

Or you can do the following to remove the popup altogether:

Form1.TableGrid1.PopupMenu := nil;