Results 1 to 5 of 5
  1. #1
    bbelly is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Dec 2014
    Location
    Edmonton, Ab, Can
    Posts
    19

    Import Excel ("X" or blank) field to Access Checkbox


    I've set myself the goal of converting an Excel "Database" to Access. Far more experience with Excel than Access.

    Trying to import data that includes several fields either selected with an 'X' or left blank. Want them to show up as a checkbox, which will then become compatible with the form I have in mind.

    I've tried replacing the X's and blanks as Yes/No, True False, and 0/-1. No luck there.

    Thinking perhaps a macro could check or leave blank a check box based on the value in a field. So field 'RED' imported as X and blank (or any other values required) from Excel would populate field NEWRED with check boxes 'checked' for the corresponding records.

    Any gurus have a suggestion?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,649
    What method are you using to import?

    What do you mean by 'no luck', what happens - error message, wrong results, nothing?

    I tested import of 0/-1 with import wizard and it works. If the import creates table, the Yes/No field defaults with textbox setting, this can be changed to checkbox in table and/or on form.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    bbelly is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Dec 2014
    Location
    Edmonton, Ab, Can
    Posts
    19
    It only imports as a yes / no field. I cannot get the field to be a check box. Importing with the wizard.

  4. #4
    bbelly is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Dec 2014
    Location
    Edmonton, Ab, Can
    Posts
    19
    I had imported this table and by brute force created check box fields beside 'x' fields, filtered for the x, and manually filled the check box. (Space bar and plus sign worked reasonably fast) Database is at around 2500 records, with 22 fields needing check boxes. When I had finished I was shocked to find that some of the fields had dissappeared - somehow deleted the new check box field as I deleted the old true /false field. At that point I decided to try this forum to hopefully not have to repeat that insanity.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,649
    Right, the wizard defaults to textbox control for the Yes/No field but it is still a yes/no field and can use a checkbox for this field on form. You can change the field in table to display as checkbox instead of textbox if that is really important.

    Instead of manually filling a checkbox field, could probably have just changed the imported field property to display as checkbox.

    22 yes/no fields makes me suspect a non-normalized data structure.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 7
    Last Post: 01-22-2014, 01:09 PM
  2. Replies: 3
    Last Post: 04-22-2013, 06:08 AM
  3. Replies: 1
    Last Post: 08-23-2012, 08:32 AM
  4. Replies: 16
    Last Post: 07-22-2011, 09:23 AM
  5. Replies: 1
    Last Post: 09-05-2008, 12:07 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