Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    bgeorge12 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Eustis, FL
    Posts
    25

    Getting Val of a Val field

    I have a field that calculates a total on the subform. This field is in the footer of subform and is named txt14.



    =Val(Forms![sbfOrderDetails]!Price*[Quanity])

    I would like for a field in the main form footer to copy the amount in txt14. I tryed = txt 14 and Val txt 14 and neither work. Please help. Thank you

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917

  3. #3
    bgeorge12 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Eustis, FL
    Posts
    25
    That is a great link and very informative, but it doesn't work. I have:
    =[Forms]![Order Details]![sbfOrderDetails].[Form]![Text14]
    and the text box says #name? Did I miss something?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Double check the SubFormControl name. It need not be the same as the SubForm it is displaying. =[Forms]![Order Details]![sbfOrderDetails].[Form]![Text14]

  5. #5
    bgeorge12 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Eustis, FL
    Posts
    25
    Checked. The name is correct.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Just change it to: =sbfOrderDetails.Form.Text14
    ...and eliminate going through the Forms collection.

  7. #7
    bgeorge12 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Eustis, FL
    Posts
    25
    Sorry just tryed that and no change. Is there some way I am suppose to be referencing that text14 is located on the formfooter of the subform?

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Nope! It should be a unique name for the entire SubForm. Try changing your SubFormControl name in both locations and see if you still have the same error. It would also give this same error if the name was not unique.

  9. #9
    bgeorge12 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Eustis, FL
    Posts
    25
    Tryed renaming it and still get the same error.

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    The name of the SubFormControl is on the Other tab of the property sheet for the SubFormControl. Change it to something else and see what happens.

  11. #11
    bgeorge12 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Eustis, FL
    Posts
    25
    That is where I changed it and nothing new happens. I keep trying various ways to write it and it still says #name?.

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Any chance you could post your db or enough of it to expost this problem?

  13. #13
    bgeorge12 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Location
    Eustis, FL
    Posts
    25
    Here is my DB. I had to zip it to get it to fit.

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Sorry, but I did not get notification that you posted again. I'll look at your db.

  15. #15
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Let's start here: Does your SubForm run by itself and if not, why not?

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 01-12-2011, 08:59 AM
  2. Replies: 9
    Last Post: 12-15-2010, 01:44 PM
  3. Replies: 1
    Last Post: 11-13-2010, 12:57 PM
  4. Replies: 3
    Last Post: 11-05-2010, 03:10 PM
  5. Replies: 1
    Last Post: 02-26-2009, 11:31 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