switching text fields with one another

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kumana1
    New Member
    • Feb 2007
    • 9

    switching text fields with one another

    Hello everyone, this is my first post.

    Here's my problem. I have a database that consists of people and their contact information. Some of those people have upwards of 3 different mailing address, and sometimes the primary address needs to be switched with one of the other supplemental addresses for this contact. How would I setup a button to switch or flip-flop the address fields? I tried writing a macro for this, but when I ran it information from one address box would carry over, but not the other. I'm thinking that I might need some kind of a median, where the data is temporarily stored and then placed.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    That's exactly what you'll need. A middle man who'll store the values of one before replacing it with the other. I never use macros so I don't know their functionality but this can be done with code.

    Comment

    • kumana1
      New Member
      • Feb 2007
      • 9

      #3
      Appreciate the response. I wasn't sure if my thinking was correct, but now I'm reassured.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        Not a problem. Let us know how you get along and if you have any other questions.

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32662

          #5
          Originally posted by kumana1
          Hello everyone, this is my first post.

          Here's my problem. I have a database that consists of people and their contact information. Some of those people have upwards of 3 different mailing address, and sometimes the primary address needs to be switched with one of the other supplemental addresses for this contact. How would I setup a button to switch or flip-flop the address fields? I tried writing a macro for this, but when I ran it information from one address box would carry over, but not the other. I'm thinking that I might need some kind of a median, where the data is temporarily stored and then placed.
          If you store your data properly (See Normalisation and Table structures), you won't need anything complicated at all. You simply update the flag which indicates the primary address. It may be a reference on the people table or even a flag on the address table. If the latter, then both records involved in the switch would require updating.

          Comment

          Working...