[Solved] Date textbox and "enter" button

Creating and using forms
Post Reply
streub
Posts: 128
Joined: Thu Jan 02, 2014 2:48 am
Location: Wisconsin

[Solved] Date textbox and "enter" button

Post by streub »

I have a simple database for recording store visitors. I need to have the date textbox to always display the current date.
Lastly, after completing the data entry I want a command button that can be clicked to enter the data into the table.

Finding the exact information I need has been difficult.

Thank you

Streub :crazy:
Last edited by streub on Sat Jan 30, 2016 11:44 pm, edited 1 time in total.
Streub

The more I learn from this forum, the more I get excited about using this strange application
F3K Total
Volunteer
Posts: 1038
Joined: Fri Dec 16, 2011 8:20 pm

Re: Date textbox and "enter" button

Post by F3K Total »

Hi,
find attached an example. If you store a new record, the current timestamp will be set automatically.
The timestamp is not previously displayed.
It's created, if you click on "save".
To have this function, i had to execute once, via Tools/SQL ... this command:

Code: Select all

alter table "Visits" alter column "Timestamp" set default "Current_Timestamp"
R
EDIT: If you only want to have the current date, apply a command similar to the following to a DATE column:

Code: Select all

alter table "Visits" alter column "date_of_visit" set default "Current_Date"
Attachments
StoreVisitors_default_Current_Timestamp.odb
(12.4 KiB) Downloaded 168 times
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
streub
Posts: 128
Joined: Thu Jan 02, 2014 2:48 am
Location: Wisconsin

Re: Date textbox and "enter" button

Post by streub »

You are most kind providing me with your advise.

Thank you

Streub
Streub

The more I learn from this forum, the more I get excited about using this strange application
Post Reply