Results 1 to 8 of 8
  1. #1
    Deb4566 is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2013
    Posts
    9

    Question Expressions in Form

    I created an expression in a form that adds 14 days to a field "Received Date" and places the information in the form in a field "Due Date". When I runa query, the field "Due Date" is blank. What have I done or not done?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    Post the query SQL statement for analysis.
    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.

  3. #3
    Deb4566 is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2013
    Posts
    9
    Select [subpoena tracking].clinic, [subpoena tracking].[date received], [subpoena tracking].[clinic contact], [subpoena tracking].requestor, [subpoena tracking].[control #], [subpoena tracking].[last name], [subpoena tracking].[first name], [subpoena tracking].[ar #], [subpoena tracking].[date records sent], [subpoena tracking].[due date]
    from [subpoena tracking];

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    That query has no reference to the form. If [due date] is not a field in table and you simply want to calculate this value, do it in the query.

    SELECT *, [date received] + 14 AS [due date] FROM [subpoena tracking];


    If [due date] is a field in table and you want to populate it, that requires either an UPDATE query or VBA code. However, this value can be calculated when needed - no need to save to table. It is usually not desirable to save calculated data. A database principle is save raw data calculate in reports.


    Advise no spaces or special characters/punctuation (underscore is exception) in names. Better would be ControlNum or Control_Num, not Control #.
    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.

  5. #5
    Deb4566 is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2013
    Posts
    9
    [Due Date] is a fileld in this table. I have the expression in that field in the table. While I understand that raw data is the idea behind the db and calculations are in reports I have a need for it to be in the form (multiple people looking at it without timely access to the report). [due date] calculates within the table but when I ran the query tied to that table it doesn't populate. Nvm. I think I know what I didn't do. The expression is only in the form not the table. The query is pulling from the table not the form. I need to put the epression in the table. yes?

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    You are using Access2003? Cannot have an expression in a field in table. Calculations can be done in query, textbox, or code.
    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.

  7. #7
    Deb4566 is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2013
    Posts
    9
    drat! ok, I know how to do the expression in a query but it shows the column headrer as Exrp1 or some such code-y language. For the people that will need this information can I change it to read "Due Date"?

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    You can change the Expr1 to whatever you want. Also, labels in form/report can be changed to whatever you want.


    Advise no spaces or special characters/punctuation in names, nor reserved words as names. Better would be SubpTracking or Subp_Tracking.
    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. Replies: 3
    Last Post: 03-09-2013, 09:58 AM
  2. Expressions in DLookUp
    By Jim Pap in forum Programming
    Replies: 1
    Last Post: 12-22-2012, 12:02 PM
  3. Queries, Look-up, and Expressions
    By Atlascycle in forum Queries
    Replies: 22
    Last Post: 02-28-2012, 06:40 AM
  4. implement expressions
    By quandore in forum Access
    Replies: 7
    Last Post: 01-11-2012, 03:48 AM
  5. Replies: 6
    Last Post: 06-19-2011, 02:16 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