Results 1 to 4 of 4
  1. #1
    ragha is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2010
    Posts
    3

    Add two Premium Fields in access 2003

    Hi



    I m new to access coding,i m working on appilication,i strucked here in calculating two fields

    In my application front end form i have 2 fields Premium1 and Premium2,in my report design view i need to add this two.so i m trying to write some this like this in my text box control source i.e
    Forms!FormName!Premium1+Forms!FormName!Premium2.Th ese 2 premiums are coming from database and already stored in access tables.

    And I tried to use the built in function Sum and selected this two fields in expression builder also,but i dint find any use.

    Plz hep me with this and let me know if you need more info.

  2. #2
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    705
    I am confused here. You are making references to controls on a form.

    If Premium1 and Premium2 are stored in a table, have you included then in the report's record source?

    If the are in the report's reccord source then you can use this you can set the control source of a text box on the report to this:

    Code:
    =[Premium1] + [Premium2]

    Better yet use this:

    Code:
    =Nz([Premium1,0) + Nz([Premium2],0)
    Last edited by HiTechCoach; 10-11-2010 at 03:36 PM.
    Boyd Trimmell aka Hitechcoach
    Database Architect and Problem Solver
    Microsoft MVP - Access Expert
    25+ years specializing in Accounting, Inventory, and CRM systems
    "If technology doesn't work for people, then it doesn't work."

  3. #3
    ragha is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2010
    Posts
    3

    Adding two Premiums

    Hi

    Sorry to confuse you,
    There two premiums are coming from form and i have to add these two and show the total in muy report.
    I was trying to use ---------
    =Nz([Premium1,0) + Nz([Premium2],0)
    ---------
    But i m getting #Error.

    As you said can you plz tell me what is this record set ,I m new to access

  4. #4
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    705
    The error is cause becuse you do not have the field from the table in the report's record source.

    Notes on terminology with Access:

    Controls are on forms
    Field are in tables
    In general report print data from field in tables.

    It is common to use a form to collect criteria for filtering a report. It is common to reference to form to show the criteria used.

    You said:
    These 2 premiums are coming from database and already stored in access tables.
    If they are already stored in the table then why are you making a form reference.

    Are you making an unbound report?
    Boyd Trimmell aka Hitechcoach
    Database Architect and Problem Solver
    Microsoft MVP - Access Expert
    25+ years specializing in Accounting, Inventory, and CRM systems
    "If technology doesn't work for people, then it doesn't work."

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

Similar Threads

  1. Convert access 2003 to access 2010
    By Vera in forum Access
    Replies: 3
    Last Post: 07-16-2010, 11:01 AM
  2. Replies: 1
    Last Post: 04-03-2010, 09:35 PM
  3. Replies: 6
    Last Post: 12-01-2009, 11:59 AM
  4. How to merg fields in MS Access 2003
    By vahidam in forum Queries
    Replies: 0
    Last Post: 02-17-2009, 08:47 AM
  5. Replies: 1
    Last Post: 09-06-2006, 11:48 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