Saving a form to a table in Access.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aweather
    New Member
    • Jul 2010
    • 2

    Saving a form to a table in Access.

    Hi There,

    I've read through multiple posts on how you aren't supposed to save information from a form to a table. But i need it to save. The information I am inputting will not change thats why I would like it to save. I was able to get the equation up and running on the form, however I have no idea how to get it to load and save properly into the table. Please help me!

    Thanks! :)
  • Accrj19
    New Member
    • Jul 2010
    • 9

    #2
    I'm not sure I understand what you are asking, but you can create a form with the RecordSource = table you want to update.

    Then you can create textboxes on the form where the Control Source = field in the table you want to update.

    Then you can type in the values in the texbox(es) on the form and it should update the table.

    Hope that helps.

    Bob

    Comment

    • missinglinq
      Recognized Expert Specialist
      • Nov 2006
      • 3533

      #3
      I've read through multiple posts on how you aren't supposed to save information from a form to a table.
      Actually, that's exactly how you're supposed to save data to a table!

      Your post is, indeed, murky as to your intent, but I'm guessing that you're actually talking about saving calculated data to a table, not data in general!

      And as you've apparently read, this is seldom advisable! The fact that you believe that your data will never change really isn't a valid reason to do so! Re-calculating data, whenever needed, is almost always going to be faster than retrieving it, and data does change, quite often unexpectedly!

      If you insist on doing this, however, you have to bind the control holding the calculation results to a field in your underlying table, using the control's Control Source Property.

      If this is where the Expression, read formula, for the calculation is currently residing, as I'm guessing it is, it will have to be moved elsewhere!

      The usual place for the code would be in the AfterUpdate events of the controls holding the components of the calculation. If, for instance,

      txtTotal = txtTime * txtRate

      you would bind txtTotal to a field in your table and then, in both the txtTime_AfterUp date and txtRate_AfterUp date events you would place

      Me.txtTotal = Me.txtTime * Me.txtRate

      Welcome to Bytes, aweather and Accrj19!

      Linq ;0)>

      Comment

      • aweather
        New Member
        • Jul 2010
        • 2

        #4
        Oh man this is getting more and more frustrating and it's not working. I tried what you said with using the after update and all that.

        You are right, I had the equation in the control source and the answers I wanted were showing in the Form. which was great however they werent being shown in the table.

        So I tried what you said and now the answers aren't showing on the form or in the table.

        What is the "Me." expression? is that used for everyone?

        I need some serious help. haha

        Comment

        Working...