Alpha Video Training
Results 1 to 3 of 3

Thread: Current date required in table field default form

  1. #1
    David Morgan
    Guest

    Default Current date required in table field default form

    I have just downloaded Trial Version 6. Absolute beginner.
    Decided to keep matters simple. Created table with just 3 fields.
    (a)Id (b)Dateofentry (c)Name
    That's it.

    Id type = character width = 3
    Dateofentry type = Date width = 8
    Name = character width = 20

    Id I made autoincrementing
    Dateof entry I went to Code and used Xbasic simple entry "Date()" to return Current Date
    Name I left alone.

    Went to the table default form and used tab to go past Id and Dateofentry and entered a name. The Id gave a value of "000" the Dateofentry did nothing and the name was entered. So thinking perhaps it need the record entered first before it would evaluate I went to the next record with the same results. Id went to 001 but nothing in Dateofentry.

    I thought this would be such a simple operation that I am of course initially disappointed. Am I expecting things to be too simple or alternatively is it a case of thinking too deeply!

    Your kind help will be appreciated. I suppose it does not matter how hard I reason this one out, if I am going down the wrong road I will never get to my destination! That's why I have posed now.

    Many thanks
    David

  2. #2
    Member
    Real Name
    Bill Warner
    Join Date
    Apr 2000
    Posts
    905

    Default RE: Current date required in table field default f

    Assuming you want the date field to show today's date when you create a new record, you could do it two ways - as a calculated field, or as a default field (this is in field rules).

    The default is better in many cases, because it will show the current date for a new record, but will NOT change if you change the record. This way, the date that the record was created remains intact.

    To do this in field rules, go to the Data tab, click on the box next to Default Mode, and select Simple Default Expression. Then the Default Value box will appear. Put DATE() in this box.

    it's also a good idea to check the box below, Set default value at start of data entry. This insures that the date will appear when you create the new record, so you don't have to go to that field (unless you want to ).

  3. #3
    David Morgan
    Guest

    Default RE: Current date required in table field default f

    Hello Bill

    Thank you for responding to my question and for doing so very quickly indeed. Appreciated.

    OK worked that out now you showed me how. However, I have just seen why I never even got to have a look at an option box on the screen. I saw the 2 choices which came up, Default Descriptive name, and Field Description, and because they were at the bottom of the screen I thought that was the end. I never saw the down arrow that would have led me to the Calculated Field Expression. Many thanks anyway.

    By the way, I am having a problem nevertheless. When I go to the Data tab, the actual boxes are not being displayed properly. There seems some sort of corruption, I get half a white box and half a blue arrow - but the arrow did not allow any choice. And, the boxes below that were also only half showing. So I deleted my test table and started again, and was just able to do what you suggested. But once again the full white rectangle box to put in Date() was only half showing. But the arrow was selectable.

    Never mind. Now I am on my way thanks to your assistance. Very grateful.
    David

Similar Threads

  1. Change default date on form
    By Bill Clementz in forum Alpha Five Version 6
    Replies: 2
    Last Post: 06-20-2005, 08:27 AM
  2. set field to hold current date everyday
    By Raheel Ahmed in forum Alpha Five Version 5
    Replies: 9
    Last Post: 07-19-2004, 10:05 AM
  3. Table lookup appears behind current form
    By Greg Fong in forum Alpha Five Version 4
    Replies: 13
    Last Post: 02-17-2002, 03:24 AM
  4. Is the current object a date field
    By Terry Morgan in forum Alpha Five Version 4
    Replies: 1
    Last Post: 11-07-2001, 12:05 PM
  5. How can Update a field in only current rec w date
    By Glen Beer in forum Alpha Five Version 4
    Replies: 2
    Last Post: 02-08-2001, 07:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •