Results 1 to 3 of 3
  1. #1
    Thomas L is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    2

    =[Price per hour]*[Number of hours] delivers 0 in the column Sum total.


    Hi there all experts

    I have created a text box labeled price per hour to fill in:
    Price per hour in my access form.

    I have created a text box labeled number of hours to fill in:
    Number of hours in my access form.

    I
    have created a text box labeled Sum total with the code:
    =[Price per hour]*[Number of hours]
    When exporting from Access to Excel, everything works just fine but when I want to get external data into an Excel Form from that Access database it delivers 0 in the column Sum total.

  2. #2
    maximus's Avatar
    maximus is offline Expert
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    Hello Thomas welcome to the Forum. My question is this is the TextBox u have mentioned in your post is an unbound text box that you are using to display =[Price per hour]*[Number of hours] on your form or it is bound to a field.

    Solution:

    I will illustrate with a small example suppose I have a simple table Table1 with the fields ID, Items, Quantity, Price.

    Now I would like to make a form and would like a Textbox to reflect Quantity*Price on it.

    I will make a Select Query with a calculative field Total. The Sql Syntax:

    SELECT Table1.ID, Table1.Item, Table1.Quantity, Table1.Price, [Price]*[Quantity] AS Total
    FROM Table1;

    Now make this the Recordsource of your form. when you update the Quantity and Price Fields on your Form the Total Field is also updated, to transfer the data to excel you can just export the Query to Excel using the the export option.

  3. #3
    Thomas L is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    2
    Thank you very much for you help maximus.
    Problem is now solved with you wisdom and my stubbornness

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

Similar Threads

  1. Replies: 5
    Last Post: 09-10-2010, 10:07 AM
  2. Total of column with check boxes
    By turbosdad in forum Queries
    Replies: 4
    Last Post: 08-07-2010, 07:03 AM
  3. Replies: 8
    Last Post: 05-24-2010, 04:24 AM
  4. Replies: 7
    Last Post: 04-27-2010, 02:47 PM
  5. Replies: 1
    Last Post: 03-12-2009, 09:55 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