Results 1 to 4 of 4
  1. #1
    deepakg27 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    160

    Calculation Function In Form

    Hi Guys,



    I was just wondering, whether it is possible to have simple calculation functions available in forms for a cell like in excel.

    Lets take an example of Production Database
    For example: in Datasheet view like we are feeding number in production table, Like in Excel if required we ca type "=34+54" and get the result as cells value, is it possible to do the same in access in forms, specially under Data Sheet View.

    Thanks for your help.
    Regards
    Deepak Gupta

  2. #2
    Beetle is offline Unrelatable
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    Camp Swampy (Denver, CO)
    Posts
    207
    You can do this with an unbound text box control, assigning it a Control Source like =[Field1] + [Field2], but unbound controls can be problematic on Data Sheet or Continuous forms. You're better off doing this using a calculated field in a query that is used as the record source of the form.

    SELECT Field1, Field2, Field1 + Field2 AS YourTotal FROM YourTable;

  3. #3
    deepakg27 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    160
    Dear Beetle,

    Thanks for your help, but I feel I was unable to explain my self. I don't want to create extra field. Like in Production database we add daily production for each production line, which is generally single figure (like 56 or 99 etc), but some times it happens that production for the line is more than one figure (Like 56 & 99=56+99=155), now I want to be able to add the two in that particular field itself. Don't want to use calculator to do it and then insert the figure. Neither want to create extra field as you suggested. Want to do it just it takes place in MS EXCEL (=56+99). Is it possible to do in Access or Not. Though I am quiet certain with help of custom function it can be easily achieved atleast for a limited number of calculations.

    Hope I have been able to explain my self.
    Thanks and Regards
    Deepak Gupta

  4. #4
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Use the Eval function in the textbox after update event

    Code:
    =Eval(textboxname)
    Or if you want to see the result in a different textbox, use that code as the other textbox control source
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

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

Similar Threads

  1. Date function calculation
    By jmuirman1 in forum Queries
    Replies: 13
    Last Post: 03-20-2017, 06:56 AM
  2. Calculation of steady function
    By ANJIBA in forum Queries
    Replies: 14
    Last Post: 05-07-2014, 02:19 PM
  3. Function calculation part
    By azhar2006 in forum Access
    Replies: 4
    Last Post: 03-25-2014, 02:25 PM
  4. Calculation Function In A Report
    By scubagal in forum Reports
    Replies: 1
    Last Post: 12-27-2011, 02:22 PM
  5. Various Day Calculation Function
    By access_tom in forum Access
    Replies: 6
    Last Post: 10-13-2010, 02:37 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