Results 1 to 6 of 6
  1. #1
    natonstan is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2014
    Posts
    37

    Check Boxes linked to table?


    I basically have a form with a list of check boxes, I then have a seperate table for each check box. Basically what I am trying to do is have an Export button at the bottom of the form, so that depending on which check boxes are checked, it will export the data in the linked table.

    Can anyone give me any advice on how to do this? I've never really worked with check boxes before so this is all alien to me.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    So you need If Then structures:

    If Me.checkbox1 Then
    'code to export table1
    End If

    If Me.checkbox2 Then
    'code to export table2
    End If

    etc.
    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
    natonstan is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2014
    Posts
    37
    Here's the code I ended up going with:

    Code:
    If Me.Check439 Then
    outputFileName = CurrentProject.Path & "\Export_" & Format(Date, "yyyyMMdd") & ".xls"
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "tblEastSoutheastAsia", outputFileName, True
    End If

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    It works? Issue solved?
    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.

  5. #5
    natonstan is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Oct 2014
    Posts
    37
    Issue is solved, just trying to get the file location to save to users Desktops now, but you can mark this one solved as the original issue is fixed, thanks for the help!

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    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: 6
    Last Post: 05-10-2012, 10:32 AM
  2. Dynamic Check Boxes values from table
    By ktmjamal in forum Forms
    Replies: 1
    Last Post: 02-21-2011, 07:49 AM
  3. Replies: 3
    Last Post: 11-03-2010, 09:53 AM
  4. How do I add multiple table entries using check boxes?
    By avarusbrightfyre in forum Access
    Replies: 3
    Last Post: 10-21-2010, 01:09 PM
  5. Replies: 0
    Last Post: 04-19-2008, 09:08 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