Results 1 to 5 of 5
  1. #1
    Lynn is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    25

    Entries not saved in fields

    Hi,
    I have a subform with two unbound fields. One calculates expiry date and the other counts down the days to expiry. When I input into the form and subform, the fields work as they should but if I save, close out and come back in, the form fields are blank. How do I ensure the data remains visible in the fields?
    Thanks,
    Lynn

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    have the calculation done in VBA on form load.

  3. #3
    Lynn is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    25

    RE: Entries not saved in fields

    Thanks, question though...the calculations depend on information I input in other text boxes so if I put the calculation on form load, then will it readjust once the data is inputted?

  4. #4
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    In that case the other textboxes will be cleared out as well making the calculation not work. The only other idea I have is to have an intermediate table. instead of running your calculations and displaying in an unbound textbox, you can run your calculation, save it into a table, then have the textbox bound to the table (or to a query displaying table data). that way it will always display. I hope someone else can chime in with a better idea.

  5. #5
    Join Date
    May 2010
    Posts
    339
    Lynn,

    It sounds like everything is working correctly! I'll give you a example of how this could work. In my sub form I have a field named "Parcels" in the sub form’s footer I have a unbound textbox called Text14. In the control source I have this calculation.
    Code:
    =DSum("parcels","tblpurchdata","warehouseid=" & nz([warehouseid],0))
    Ok now on the main form I have another unbound textbox called "txtTotals" in its control source I have this calculation
    Code:
    =[Form2].Form!text14
    Text14 does the calculations [hidden btw] while txtTotals displays it constantly I hope this sheds a little light on how you can calculate on the fly so to speak...and never never try to save this to a table they are for reports or forms. Me.Requery in the forms after update might help also.


    Regards,

    Richard

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

Similar Threads

  1. Replies: 1
    Last Post: 04-03-2010, 09:35 PM
  2. Replies: 9
    Last Post: 02-19-2010, 12:07 PM
  3. How do I set a link from a saved path
    By cowboy in forum Reports
    Replies: 5
    Last Post: 02-16-2010, 12:43 PM
  4. most recent entries
    By tom4038 in forum Queries
    Replies: 0
    Last Post: 09-14-2009, 04:41 AM
  5. Replies: 0
    Last Post: 06-03-2009, 10:25 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