Can I have some assistance with how to insert the current date on a Form permanently. I would like to automatically update my "Invoice Due Date" section from this Current date. Some keywords/reserve Words or code would be appreciated.
Regards Paul
Printable View
Can I have some assistance with how to insert the current date on a Form permanently. I would like to automatically update my "Invoice Due Date" section from this Current date. Some keywords/reserve Words or code would be appreciated.
Regards Paul
In your coding window while you are editing code, right click on your mouse and scroll down to object browser. In the second drop down box, type in 'datetime'. Doubleclick on the resulting datetime result, (make sure your object browser window is maximised).
There you will see all of the properties available to you as part of the datetime object. Clicking on a property will tell you what it does towards the bottom of your window.
You can use them very simply. For instance,
date$ and now are properties of the datetime object, returing the current system date and the current date and time respectively. So if you wrote something like ...
label1.caption = date$
label2.caption = now
That would display some info on your form.
Regarding the permanancy of the date, I would just suggest you make the field the date is in non-editable so the user cannot change it.
Hope that helps
Regards
D