Updating a Text Box in a Form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gravesk
    New Member
    • Mar 2010
    • 13

    #1

    Updating a Text Box in a Form

    Hi -
    I am using Access 2003, and am not that familiar with Access. I am not at all familiar with VB.

    I created a form from a query. Most of my text boxes on the form can be updated (i.e., I type in a value and if I close the form and then come back to it, the value is still there). For example, the text box called case # updates correctly. When I close the form, it prompts me to save my changes.

    One field (folder #) does not update. I can enter a value, move to a new record, come back again, and see what I entered. But if I close the form and then open it again, the value is gone. When I close the form, there is no prompt to save my changes.

    I've looked at all the properties for the two text boxes and they seem to be identical.

    What else can I check?

    many thanks,
    Kristin Graves
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    Is this a new field you've added to your table, and perhaps forgot to add to your query? If you select the textbox and go to Properties - Data, does the field have a Control Source?

    Welcome to Bytes!

    Linq ;0)>

    Comment

    • gravesk
      New Member
      • Mar 2010
      • 13

      #3
      No, this is not a new field. And yes, the field is listed in the control source.

      thanks,
      Kristin

      Comment

      • slenish
        Contributor
        • Feb 2010
        • 283

        #4
        Hello gravesk,

        going off of what Linq said about the control source. Did you check to make sure that the control source for the text box that is not saving is not linked to the same control source of another box?? I only ask this because you said in your original post, "I checked the properties of one text box compared to another and they are identical." I would just check to make sure they are not saving to the same place.

        Also check your control source of your form and make sure you have created a spot for that text box to save to.

        Comment

        • gravesk
          New Member
          • Mar 2010
          • 13

          #5
          Hi -

          The two text boxes are NOT both linked to the same control source. That is the part of the properties that is not identical. I should have been clearer about that.

          As for creating a spot for the text box to save to, I'm not sure what you mean. I want the text box to save to the control source field (I may be using incorrect terminology here).

          thanks,
          Kristin

          Comment

          • slenish
            Contributor
            • Feb 2010
            • 283

            #6
            Sorry that is my mistake on the spot for the text box to save to. I meant do you have a designated source on your table for your text box to save to and it sounds like you do.

            I can think of a number of things that could be wrong but im not sure of exactly what it could be.

            Here is a list of things I would check.

            first check on your table in design mode what your index is set to. If you are trying to save duplicate fields or if you are not I would change that accordingly. Because if you are saving duplicate records and you dont have the index set it wont save to the table.

            Next I would check your query. If you are saving info to that I would make sure in the query the field you want to save to is listed, also check and see if the info is saving in the query and not in the table or vice versa, had that happen one time and still not sure why....

            Also I dont know if you have it or not but I would put in an add record command button. from the way it sounds you are just closing your form and hoping it saves. A button you can press that will save your information with out closing your form is a little safer.

            Another thing you could try is link the text box to a different control source and see if saves it that way. I would create a new field in your table/query and try saving to that one and see if you have any luck.

            That is all I can think of off the top of my head. Maybe someone else will come up with a better solution for you.

            Comment

            • mshmyob
              Recognized Expert Contributor
              • Jan 2008
              • 903

              #7
              Is the Folder# field an autonumber? If it is it won't save.

              cheers,

              Comment

              Working...