Hello Kim143,

Welcome to MVD - good choice!

To align a tablegrid (or any component - grid, label, panel etc), place the component where you want to see it on the form and then change the 'anchors' object property (see screenshot in the attachment);  depending on your choice, this will determine how the component behaves when the form is resized.  The component itself cannot be resized (as far as I know) - just the form.

In the attachment are a couple of examples of tablegrids, labels and panels that have different 'anchor' properties - as you resize the form, you'll see how they move depending on their 'anchor' settings.

Just a tip - if you have a tablegrid and a label, it is probably better to place them both on a panel and then set the 'anchor' object properties for the panel otherwise the label and the tablegrid can get a bit out of alignment (in the attachment, tablegrid3 and label3 have both been placed inside panel1 so they alway 'stick together' when moved).  Hope I've explained that clearly!

Hope this helps and if you have any other questions, just ask and someone in the Forum (or Dmitry - Mr MVD!, the author of the software) will get back to you.

Regards,
Derek.

2,252

(2 replies, posted in General)

Hi Adam,
Attached is an example from something I wrote a while ago.  It uses a postcode (zip code) from the tablegrid and builds a url in the script.
I think it should be enough to show you how to get your working.
Regards,
Derek.

2,253

(5 replies, posted in General)

Hello Nitin,
Another approach you could take is -
1.  Add a trainer name of '-' and a student name of '-'.
2.  Tick the 'sorted' object property for combobox3 and combobox4
3. When you click the 'clear data' button, set trainer name and student name to '-' instead.
This should work with versions before 3.3.
Regards,
Derek.

2,254

(5 replies, posted in General)

Hello Nitin,
I believe your problem is fixed by updating the comboboxes after you've clicked 'clear';  for example
form1.combobox1.dbupdate
However, I think this will only work if you are using Version 3.
If you are using an earlier version and this doesn't work, let the Forum know and I'm sure there will be another solution.
Please see the attachment.
Regards,
Derek.

2,255

(12 replies, posted in General)

Hello Nitin,
Please find attached a couple of alternative ways of showing the information that I think you want.
1).  I have used calculated fields instead of SQL Query to show a summary tablegrid of each book title by status.
2).  I have used tablegrid filters to show 3 detailed tablegrids by 'issued', 'not issued' and 'missing'.
You do not need to use a script at all - it is just standard MVD.
Maybe this helps you.
Regards,
Derek.

2,256

(10 replies, posted in General)

Adam,
Please find attached which I think is what you are wanting;  each page control grid displays as per your screen-shot (I assumed you also wanted the totals altering (ie 3 rows in total for Organisation 1 rather than 5,  2 members rather than 4 and  2 smokers rather than 3).
The 'fake' edit should also be working.
Regards,
Derek.

2,257

(10 replies, posted in SQL queries)

Hi EHW,
Thanks for that - I try to keep up to date with posts in the forum as the best way of finding out new ways to do things, new features etc, but I think I must have missed this one.
I was on 3.1 but have just upgraded to 3.4 beta so I'll find the project that my original post related to and give it a shot.
Regards,
Derek.

добрый день Stas.kodpi,
Sorry, I do not speak Russian so I hope I understand your problem.
I think your table field names must start with A-Z, not 0-9.
So, replace dela.101 with dele.a101, dela.105_106 with dela.a105_106 etc etc.
See attached.
Derek.

2,259

(3 replies, posted in General)

Hi Nitin,
When you have more than one relationship between the same tables (as you do between 'studentdadabase' and 'centrename'), MVD is only able to retrieve the FIRST value into the table automatically (in your example 'centrename')  but the second  'centrename' value has to be retrieved using a calculated field.
Please see the attached.  I have left your original tablegrid columns so you can see the difference when the calculated field is added to the grid.
Regards,
Derek.

2,260

(37 replies, posted in General)

Hi Adam, Hi EHW,
I was wondering if you could take a slightly different approach to this issue which might eliminate some of the complications.  My idea is as follows:
1.  For recurring expenses, use both an  'expense from' date and an 'expense until' date (I suspect most recurring expenses WOULD have an end date rather than being totally open-ended).
2.  Specify the frequency of expense payment (ie daily, monthly etc)
3.  When you click 'save', immediately create ALL the expense payment records (ie, for a recurring monthly expense that lasts for 12 months, create 12 records where the expense date of the first record = 'expense from' date, the expense date of the second record = 'expense from' date + 1 month etc etc
4.  Filter your main tablegrid to only show expenses due by the current date or earlier.
Using this approach, the whole question of 'when do you generate the next recurring expense record and what is the trigger' simply goes away - they're already there and waiting.
It also has the added benefit of being able to see what future expenses you are committed to but which aren't yet due (ie what are my recurring expense commitments next month etc etc)..
Anyway, have a look at the attachment and maybe it will help.
Please note - I used EXCEL to generate my test data rather than writing any of the script that would be needed to insert records when 'save' is clicked - but the script that EHW has written already does most of what is needed (it looks like you'd basically be using the 'expense until' date rather than 'today').  I didn't have the time to modify it (and I suspect I'd have struggled anyway - it's a really neat bit of coding).
Regards,
Derek.

2,261

(4 replies, posted in SQL queries)

Hi Dmitry,
I tried ltrim but was using an incorrect format.
Thanks for your help,
Derek.

Hi,
If you are using a text field, then you can use substr instead of strftime - for example substr(textbirth,1,2) will take 2 characters, starting in position1 (which should work for your mm/dd/yyyy text field format).
Please see attached.
Regards,
Derek.

2,263

(10 replies, posted in General)

Hi Adam,
Using the 'standard' footer options that come with the grid , it will only count the number of rows.
To get totals for rows that contain certain values, you'd need to write a small script (one line for each total so it's not a big deal).
See attached.
Derek.

2,264

(10 replies, posted in General)

Hi Adam,
So are you actually wanting to filter rows or just display them differently ('yes' and 'blank' rather than 'yes' and 'no')?
In that case, I'd use a couple of calculated fields (see attachment).
If you DO want to exclude rows (ie where they are neither a 'member' nor a 'smoker') then that's where you'd use a grid filter (in my example, I have two grids, one unfiltered (returning 7 rows) and one filtered (returning 5 rows).
Derek.

2,265

(10 replies, posted in General)

Hi Adam,
I've just re-uploaded it, just in case.  I've been able to then download it so I think it should be okay now.
Derek.

2,266

(10 replies, posted in General)

Hi Adam,
On the face of it, I would have expected what you've done to have worked - is there something else going on?
If you attach your example, someone might be able to spot something.
In my attachment (each grid filtered slightly differently), you see that it's quite tolerant of 'is' or '=' and any brackets.
Derek.

2,267

(4 replies, posted in SQL queries)

Hi Jean,

Thanks for the list - it will be very useful (I always have problems formatting dates - my bête noire!).
But what I am trying to do is part of an SQL QUERY, not part of a script;  as I understand it, you have to use strftime within SQL QUERY.
From google searches, I thought that a strftime format of '%#m' would remove the leading zero of a month but it doesn't work for me.
.
Dmitry,

Do you know of any other options?

Derek.

Hi Gonpublic,
Maybe the attached project will help you.
I have used a calculated field (employees.cfmonth) to temporarily store the month (in english, sorry!).
You can then compare the month selected in form1.combobox1 with employees.cfmonth to filter those employees with birthdays in that month.
Because there is no relationship between the 'employees' and 'months' tables, I use a very small script to copy the value from form1.combobox1 to form1.edit1 (defined as employees.cfmonth) so that form1.edit1 can be used as the search filter.
But there will be other ways as well - this is just one suggestion.
Regards,
Derek.

2,269

(4 replies, posted in SQL queries)

Hello Dmitry,
Is there a way to format strftime to remove the leading zero from the month?
Using strftime('%m', xdate) results in '01' for January, '02' for February etc and what I need is '1' , '2' etc.
I have tried strftime('%-m', xdate) and strftime('%#m', xdate) but neither seems to be supported.
Thanks for any help,
Derek.

2,270

(9 replies, posted in General)

Hello Jean, Mathias, Adam,
I've been away so only just now catching up on comments in the forum.
Jean, I'm not sure if it helps but attached is a little application I wrote a while ago when I was VERY new to MVD (which is why the script is terrible - LOL!).  I use it for simple diary / notes / reminders but I'm sure if you changed the labels, you could use it for bookings.
In the meantime, I might 'steal' some of Mathias' good ideas and try and develop it around tgrid more.
Adam - correct, it was simpler and quicker to knock up the data in Excel and then import it into sqlite so that each day is already there, as a container, waiting for any notes to be written.
Regards,
Derek.

2,271

(9 replies, posted in General)

Bonsoir Jean,
I'm not sure if this will give you any ideas.
Regards,
Derek.

2,272

(2 replies, posted in General)

Hello Dmitry,
Just downloaded the fix and it's working now.
спасибо,
Derek

2,273

(2 replies, posted in General)

Hello Dmitry,
I am using the 'in-grid' editing function but I am unable to enter negative values (please see attached screen-shot).
Is this something you can fix?
Thanks,
Derek.

2,274

(17 replies, posted in Script)

Hi Adam,
Not sure if I'm misunderstanding you about the clock.  Why do you need to go onto the internet to get specific location times - can't you just work it out as plus N hours or minus N hours offset from your PC's own clock?
Example is attached (for maximum flexibility, you can select your own locations (up to 24), the time zone offsets etc etc by clicking on the 'SETUP' button).  I appreciate it's just a digital clock (rather than the analogue one) but the principle is identical if you want to make use of it.
Regards,
Derek.

2,275

(17 replies, posted in General)

Hi Timlitw,
DBupdate isn't new in itself but it's normally used in relation to a tablegrid update.  I think dbupdate with a combobox must have been introduced with one of the very latest versions.  It's a pity because it's a really easy way to filter a combobox.
When you say that you'd like to filter in a 'smarter way' so that, for example, only products that a trucking company hauls is shown, it sounds very much like the sort of thing that you'd use the parent combobox function for.  It might be easier than trying to script it.
I meant to mention in my last post - your application continues to run in the background when you quit it;  I think it's because the Form1_Onclose procedure in the script has lost its reference back to the Form1_Onclose event in the object properties.
Derek.