Results 1 to 10 of 10
  1. #1
    smahdih is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    52

    How can i store expressions in table?

    hi everyone



    i create a table with below field
    Field name Type
    ToolsCode Text Primary Key
    ToolsName Text
    OldCalibration Date and Time
    LeadTimeCalibration Date and Time
    DueDateCalibration Date and Time

    and create a form with above fields, i want DueDateCalibration equal with OldCalibration + LeadTimeCalibration

    How can i do?

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Don't store a calculated field.
    Use a query to do the calculation whenever that value is needed.

    In this case use the wizard to create a bound form.
    Then add a textbox and set its value to your expression.
    You may need to work with DateAdd or DateDiff function .

  3. #3
    smahdih is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    52
    Quote Originally Posted by orange View Post
    Don't store a calculated field.
    Use a query to do the calculation whenever that value is needed.

    In this case use the wizard to create a bound form.
    Then add a textbox and set its value to your expression.
    You may need to work with DateAdd or DateDiff function .
    now i have below form (attach)

    by DateAdd adds [previousCalibration] and [Priode], the Enabled Property is "No"

    when click on "save" i want save current record , how do this?
    [dueDateCalibration] save in table??

    Tnx

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Do NOT save a calculation in a table.

    Run the query or display a form (based on a query) to get the calculated value whenever you need it.

    I have attached jpgs a form (design) , form values and the table involved.

    Not sure where your Type? problem comes from, but don't store a calculated field.

  5. #5
    smahdih is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    52
    very very tnx , i fixed it

    but i have question again

    i want when open an access file turn up a form not by clicking on form
    how do it?

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Can you provide more info or an example? I'm not understanding what you are trying/wanting to do.

    You can open formB from an event on a different Form, or other condition.

  7. #7
    smahdih is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    52
    very very tnx , i fixed it

    but i have question again

    i want when open an access file turn up a form not by clicking on form
    how do it?

  8. #8
    smahdih is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    52
    very very tnx , i fixed it

    but i have question again

    i want when open an access file turn up a form not by clicking on form
    how do it?

  9. #9
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    i
    want when open an access file turn up a form not by clicking on form
    how do it?
    Please provide more info. What exactly are you trying to do?

  10. #10
    smahdih is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    52
    sorry for same posts

    my purpose that is when i open a access file a special form appear simultaneous.

    like switchboard in access

    how do it?

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

Similar Threads

  1. Include expressions in table
    By siedne in forum Database Design
    Replies: 2
    Last Post: 10-11-2011, 04:34 PM
  2. Replies: 1
    Last Post: 07-25-2011, 08:27 AM
  3. How to store data many row in one table
    By dododo in forum Access
    Replies: 4
    Last Post: 06-25-2011, 12:42 AM
  4. How do I get dlookup values to store in table
    By rpmyhero in forum Access
    Replies: 1
    Last Post: 11-25-2009, 05:57 AM
  5. Replies: 0
    Last Post: 09-25-2006, 03:42 AM

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