Results 1 to 6 of 6
  1. #1
    jmuirman1 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Aug 2016
    Posts
    84

    Want to change yes/no field to text field but keep data


    I have 2500 or so "yes/no" records in the field, [payment req sent?] but need more info than yes or no. so i want to change the existing field or create a new field.

    I also want to eliminate the original field if i need to create a new field.

    Thinking some kind of a query will do this...

    thanks for your help.

    John

  2. #2
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,879
    What do you mean by "More Info"?
    Can you use an IIF() in the field?
    Code:
    IIF(MyField = 0,"SomeInfo","SomeOtherInfo")

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Add your new field to the table than create an update table to convert the existing data to text using an expression in the Update field:
    IIF( [payment req sent?] =True,"YES","NO").

    Once you run it you can open the table in design view and remove the old field. You will need to review all your other objects (queries, forms, etc.) to make sure they now reference the new field.

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

  4. #4
    jmuirman1 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Aug 2016
    Posts
    84
    by more info i mean more descriptive text than yes/no...like "awaiting confirmation before sending"...

  5. #5
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    Quote Originally Posted by jmuirman1 View Post
    by more info i mean more descriptive text than yes/no...like "awaiting confirmation before sending"...
    Then replace the "Yes" and "No" in the expression that Vlad gave you with "awaiting confirmation before sending" or whatever text you require
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  6. #6
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    @Bob, I think the OP wants to preserve the existing data (Yes/No) and for the future to be able to add different statuses/comments. I usually have a different approach in that I use a couple of fields, one called PaymentStatus (where the "more info" goes) and PaymentDate which also acts as a confirmation field similar to [payment req sent?] - if PaymentDate is populated then the [payment req sent?] =True, if the date field is empty then [payment req sent?] =False.

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

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

Similar Threads

  1. Replies: 7
    Last Post: 07-01-2017, 01:07 AM
  2. how to change text field size from 20 to 26
    By Azariah in forum Database Design
    Replies: 4
    Last Post: 07-02-2015, 09:15 AM
  3. Replies: 3
    Last Post: 02-28-2015, 06:52 PM
  4. Change Text field to Memo Field in a Query
    By Yarbz in forum Queries
    Replies: 5
    Last Post: 06-28-2012, 05:24 PM
  5. Replies: 12
    Last Post: 06-04-2012, 10:55 AM

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