Results 1 to 2 of 2
  1. #1
    bpowers2010 is offline Novice
    Windows 98/ME Access 2003
    Join Date
    Jul 2010
    Posts
    2

    Delete Field if Empty?

    Hi,



    I am creating a database with basic address information. There are 3 fields: Address 1, Address 2 and Address 3 for Street, Supplementary and Room numbers etc. I am generating a report and I was wondering if there is a way to essentially delete a field if there is no text in it. Here is an example. Two different people:

    Name: John Doe
    Address 1: 123 Sunnyvale Road
    Address 2:
    Address 3:
    City/State/Zip: Brunswick, MO 63123

    and

    Name: Jane Doe
    Address 1: XYZ Associates
    Address 2: 16 West 42nd Street
    Address 3: 9th Floor, Suite 200
    City/State/Zip: Brunswick, MO 63123


    If I set up the report to have all those fields I get the following entries:

    John Doe
    123 Sunnyvale Road


    Brunswick, MO 63123


    and

    Jane Doe
    XYZ Associates
    16 West 42nd Street
    9th Floor, Suite 200
    Brunswick, MO 63123

    So, it works for Jane (since she fills all fields) but not John (since he lacks info for 2 and 3). Is there a way to essentially delete unused fields so they wont take up space in the report. So john shows up like

    John Doe
    123 Sunnyvale Road
    Brunswick, MO 63123

    Thanks so much

  2. #2
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    This is a link to an earlier post that I had posted a code to delete Fields that are empty. I think this will be helpful for you.

    https://www.accessforums.net/program...able-5608.html

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

Similar Threads

  1. Replies: 38
    Last Post: 05-21-2010, 11:56 AM
  2. empty field
    By amber mara in forum Access
    Replies: 2
    Last Post: 05-05-2010, 01:46 PM
  3. Delete all records in a field
    By cotri in forum Forms
    Replies: 6
    Last Post: 01-29-2010, 02:44 PM
  4. replace a empty field with the word "none" how??
    By techexpressinc in forum Queries
    Replies: 1
    Last Post: 01-15-2010, 11:02 AM
  5. Empty Lookup
    By mikel in forum Access
    Replies: 39
    Last Post: 08-07-2009, 01:00 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