Topic: Calendar Help

Sorry I'm new to MVD and still learning, and not confident in coding, I'm trying to create a calendar that holds the date & time of tides with relevant tide heights on that given day. I would then like to display that tide information for any specific date that is selected. I have found a calendar on the forum and I'm trying to implement something similar into my project. I have no idea how the calendar is created and displayed on Form1.TableGrid1   with the dates and times  I cant find a Table? or the specific code to display it? I was hoping to just be able to then just upload a new Tide for the following year into the DB. I have included the excel copy of the Tides that i will load. if this is at all possible. I am open to any suggestions any help would be appreciated. (Please note this is not my project credit to Dimitry & ehwagner)     sorry cant link but  just join the below to see original post.                                                                               
         myvisualdatabase.com      /forum/viewtopic.php?id=6349
Thanks

Post's attachments

Attachment icon ExampleTimeTable using TableGrid.zip 371.33 kb, 246 downloads since 2021-08-13 

Re: Calendar Help

Hi Corey,
Welcome to MVD!
I had a quick look at the data in your spreadsheet and to be honest, I think the calendar example that you found in the Forum is overkill for your requirement, particularly if you're just starting out (and we've all been there).
Attached are a couple of more straightforward options (and there are plenty more ways of doing it) that might give you a steer.
'Tides1' uses the 'editable grid' feature of MVD which makes your application very much like a spreadsheet and is quick to knock up.  It has a search function to highlight a specific date as you mentioned in your post.
'Tides2' uses a tablegrid to view all your information and has a search function to highlight one or a range of dates;  the data is then maintained on a second maintenance form by either clicking on + Add new record or by double-clicking on an existing row in the grid.
As your readings seem to be limited to 3-4 tides per day, I've just used a single table to hold all the information rather than separate tables for the reading date and the reading times;  again this keeps it nice and simple.
Having it all on one table will also help to make importing data from a spreadsheet more straightforward.
Derek.

Post's attachments

Attachment icon tides.zip 674.79 kb, 253 downloads since 2021-08-14 

Re: Calendar Help

Thank you Derek. yes that seems a lot simpler. I really appreciate your help

Re: Calendar Help

Hi Derek,

Sorry mate  I don't mean to be a pain  I have applied the script for the Datepicker to automatically select that is working fine, I just want to know if there is a script that will simulate the left mouse click that i could possibly use on the datepicker once the date has been selected, I have reattached the Tides project that you helped with,  you will see what I'm trying to do and thanks for all your help.

Post's attachments

Attachment icon Tides3.zip 350.95 kb, 208 downloads since 2021-08-27 

Re: Calendar Help

Hi Corey,
I'd do it something like this (please see attached).
I've also added a couple of bits in that might help (or not!!) like removing the seconds / milliseconds from the grid column, setting the initial column widths to be the same (just cosmetic stuff) and a flag to show if there are associated notes (it's a pain going in and out of each record to check if there is).
Take whatever bits you find useful and bin the rest.
Derek.

Post's attachments

Attachment icon Tides4.zip 352.81 kb, 261 downloads since 2021-08-28 

Re: Calendar Help

Derek thank you so much for your help everything you have done is perfect. The tides is only part of my project I will now be able to fit this in nicely. I was just comparing the scripts that I had with what you have done, I was way off. The little cosmetic changes you made makes a big difference in the appearance and makes it tidy thank you so much for your help and time.