Results 1 to 4 of 4
  1. #1
    louise is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Apr 2015
    Posts
    112

    Include field in table or create for each usage?

    Hello,


    I currently have a field in my table, DayOfWeek, that I have been filling in via a ListBox in a form.
    But, I now would like to have the day of the week automatically filled in when I enter the date. I have done this, so far, in a query like this:
    DayOfWeek: Format(MeetingDate1, "dddd")

    This works fine. But, now I wonder I should remove the field DayOfWeek from the table and recreate the field (as a text box?) in every query where this information is required? (This occurs in many places.)

    Or, should I create it in each report, rather than the report's underlying query?

    Or, can I put that expression into the table definition of the field and thereby do it only one time? And, then, would it update if changes are made via a form at a later date?

    Thx for your help with my confusion about this!

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    You do not need DayOfWeek in your table-- provided you have a field of Date data type (
    I enter the date
    )

    Access has functions that can display WeekDay, WeekDayName of your date as and when required.


  3. #3
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Perhaps something like this.

    http://www.baldyweb.com/Autofill.htm

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Agree with orange. If you are saving full date value, don't save day of week. Calculate it when needed.

    Do not recommend setting display formats in table. I prefer to see actual value when I view tables. Also, the format will not always carry through queries, especially if the field is used in an expression - the actual value will be used.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Relationships and table usage
    By gwboolean in forum Access
    Replies: 10
    Last Post: 09-04-2015, 04:37 PM
  2. Replies: 3
    Last Post: 06-04-2015, 09:48 AM
  3. Replies: 5
    Last Post: 08-06-2013, 07:19 AM
  4. Replies: 2
    Last Post: 10-11-2012, 10:50 PM
  5. Replies: 6
    Last Post: 08-16-2012, 04:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums