Results 1 to 3 of 3
  1. #1
    Sarah11 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    2

    Setting Control Source Property Issue

    Hi



    I am new to Ms access. I am setting the control source property for a text box say txt1. I am trying to display sum of expense amount where bill number is equal to that of bill number displayed on form.
    Here is the expression that i used for this.

    =DLookUp([SUM("Expense Amount");"tblExpenses";[tblExpenses]![BillNo]=[Forms]![frmExpenses]![txtBillNo])

    I am getting Name?# error.

    Could you please let me know what is going wrong

    Thanks

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,409
    use the dsum function

    =DSum("[Expense Amount]","tblExpenses","BillNo=" & [Forms]![frmExpenses]![txtBillNo])

  3. #3
    Sarah11 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    2
    Quote Originally Posted by Ajax View Post
    use the dsum function

    =DSum("[Expense Amount]","tblExpenses","BillNo=" & [Forms]![frmExpenses]![txtBillNo])
    Wow!! That worked!

    Thank you so much :-) Good day !!

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

Similar Threads

  1. Replies: 8
    Last Post: 01-31-2015, 11:34 AM
  2. Replies: 8
    Last Post: 09-19-2013, 03:07 PM
  3. SQL Query and Form Control Source Issue
    By dhogan444 in forum Forms
    Replies: 5
    Last Post: 08-07-2012, 07:58 AM
  4. Column Control Source Property
    By rts in forum Reports
    Replies: 6
    Last Post: 05-17-2012, 06:42 PM
  5. Text Box Control Source Issue
    By timbit6002 in forum Forms
    Replies: 8
    Last Post: 03-01-2012, 02:03 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