Results 1 to 8 of 8
  1. #1
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    486

    Use unbound field as a check value

    one of my users wants me to create an unbound field that is equal to the invoice total to use it as a check figure for when he makes adjustments to the invoice he wants to see that he hasnt added or removed to much.



    I have tried this in the on open

    Dim OriginalTotal As Currency
    OrginalTotal = Me.TotalForInvoice
    Me.OriginalTotal = Me.TotalForInvoice

    but when i do the field is blank

    I just need a new unbound field that will show the same value as TotalForInvoice when the form opens so he can compare the changes he made and make sure the totals are still the same. The TotalForInvoice is also an unbound field, if that matters.
    Thanks

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Maybe it should go into the Current event of the invoice form if you can scroll through multiple records.

    Code:
    Dim cOriginalTotal As Currency
    cOriginalTotal = Me.TotalForInvoice
    Me.OriginalTotal = cOriginalTotal  'where OriginalTotal is the unbound textbox
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    486
    Thanks, I just tried that but it does the same thing

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Can you please post a small sample with the form in question (and the associated tables\queries - no sensitive data please)?

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #5
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    486
    yes, I have created a basic sample database that does exactly what mine does. If you open the invoice form you will see the blank filed for original invoice. If you click in that field it will show the value after you click. I just want to see if I can get it to show before you have to click in it.
    Attached Files Attached Files

  6. #6
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    486
    Well never mind. At first it was doing what my database was doing, now when I open it the value does show up. So this is a bad example. The version of DB i am having the problem with is Access 2013 and this is 2016 so maybe that is making a difference.

    In my active database, when you open the form the field is blank and if you click in the field or anywhere in the main form it then populates the value.

  7. #7
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    your sample db seems to work just fine. You tested the sample and it did not perform correctly?

    EDIT - then try a compact/repair on your db. If no help, I suggest that you create a new one and import everything into it and see what you get.
    There is no code running as a result of clicking on the control?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #8
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Maybe a repaint/activation delay? How do you open the form in your original db? Does it have the focus? I don't think Access versions have anything to do with this.

    Cheers,
    Vlad
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

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

Similar Threads

  1. Unbound check box on continuous form
    By Rpschwar in forum Forms
    Replies: 21
    Last Post: 10-13-2017, 03:49 PM
  2. Check if unbound textbox is null
    By matt_wpg in forum Programming
    Replies: 8
    Last Post: 06-21-2017, 08:23 PM
  3. Replies: 5
    Last Post: 01-30-2015, 02:45 PM
  4. Unbound Check Boxes on Datasheet View
    By EddieN1 in forum Forms
    Replies: 2
    Last Post: 07-23-2012, 12:47 PM
  5. Check box to add 0.5 to unbound text box
    By neoroses in forum Forms
    Replies: 12
    Last Post: 07-20-2011, 11:26 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