Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    tgambill is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    11

    Formula keeps disapearing

    I created a form which includes 2 fields with numbers in them and one box which does a subtraction of those 2 numbers. Specifically, "desired inventory" and "current inventory" and then "number to order" with the expression "=[Desired Inventory]-[Current Inventory]" in the control source box of the property sheet. My issue is that every time I open the database, I get the expression "?Name" in the "number to order" field.



    Here's the kicker...if I pull another "number to order" field into the form in an open area and mark it no for visibility, the formula works and comes up as the correct subtraction number in the original "number to order" field. The next time I open the form, I get the same error until I delete the second "number to order" field and then put it in again even though I saved the table during my last session.

    I hope this makes sense. If anyone has any suggestions, I would appreciate your 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,922
    It sounds like a timing issue. Why not put the calculation in the RecordSource query then bind your "Number to Order" control to the answer. That is where I put most of my calculations.

  3. #3
    tgambill is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    11
    Forgive me but I'm new to creating forms on Access. Please tell me how to put the calculation in the Record Source query then bind it to the "Number to Order" control. If you are talking about using the Record Source on the Property Sheet, I tried that. I have 29 fields on the form and it only gives me 10 fields on the query. The fields I don't put into the query come up with ?Name.
    I created a query based upon the original table with the calculation in the "Number to Order" field which works, but Access will not allow me to pull any fields from a query, only from tables.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,951
    Calculated fields can be referenced in textbox ControlSource.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    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,922
    Assuming your calculated query has been save, remove the RecordSource of the form and save the form. Then open the form again in design mode and set the RecordSource to the query again. You should now be able to see *all* of the fields in your query including your calculated one.

  6. #6
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    There is something wrong with your query.

    You should be able to open the query and see all the fields that you are talking about.

    If not then reconstruct your query.

  7. #7
    tgambill is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    11
    Here is the db
    Attached Files Attached Files

  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,922
    Both your "Main" and "Number to Order" forms work as expected and update the "Number to Order" controls.

  9. #9
    tgambill is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    11
    If they are both working properly, why am I still getting the errors on the "Main" form for the "Number Needed" field?

  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,922
    Hmm...I have ac2013 loaded right now. Let me load ac2010 and see if there is any difference.

  11. #11
    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,922
    Same result with ac2010. What are the specs on your PC? Speed, Ram etc.

  12. #12
    tgambill is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    11
    2.5 GHz processor, 2.00 GB RAM, 32 bit Operating system

  13. #13
    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,922
    2.67 GHz i7 920, 11GB Ram, 64 bit Win7
    What processor are you using? Even though it runs, I think Win7 likes more than 2GB Ram (at least 3).

  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,922
    Does your "Number to Order" form work properly?

  15. #15
    tgambill is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    11
    2.5 GHz processor, 2.00 GB RAM, 32 bit Operating system

    Here is what the system tells me.
    Attached Thumbnails Attached Thumbnails System.PNG  

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

Similar Threads

  1. Please help with this formula.
    By vickan240sx in forum Access
    Replies: 3
    Last Post: 09-17-2012, 03:44 PM
  2. Formula
    By Ray67 in forum Queries
    Replies: 53
    Last Post: 08-09-2012, 01:56 AM
  3. need a formula please
    By jimbob90 in forum Queries
    Replies: 1
    Last Post: 08-01-2012, 06:56 PM
  4. SQL Formula to Sum Itself
    By Scorpio11 in forum Access
    Replies: 1
    Last Post: 02-19-2011, 11:22 AM
  5. Data in Fields Disapearing
    By Robert M in forum Access
    Replies: 2
    Last Post: 07-21-2009, 03:56 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