Results 1 to 3 of 3
  1. #1
    CodyL is offline Novice
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jun 2016
    Posts
    6

    Coinciding Macros, I have an export macro and a checkbox to determine exportation; automation?

    Hello,



    I pick things up pretty quick but I was thrown into a three day training period at work with little to no experience with Access. These classes where designed to be spread a month apart to really soak in what was going on, but I took each eight hour training course in 3 consecutive days. Don't get me wrong I would have preferred it this way if I had to do it again and I took in a lot waiting 3 months would have been a hug waste of time. Be that as it may, the instructor gave me his email in case I had any questions or needed help... turns out he didn't register his domain correctly... lol

    Now that I put a little context on my experience here is a little context on what I'm doing with Access:

    At my job there are admin and production workers. The production workers are often given engineering that has a lot of mistakes from the customers and they recognize right away and have to fill out issue sheets that get entered into an issue card board for the customer to see, fix, approve ect. I've been tasked with making a functional database to streamline this process and cut down on paper use. I have created a form for production workers to enter in their issues into the computer instead of killing all the trees, when they submit their form it is written to corresponding records in a table for admin to submit to the customer.

    In that table there is a yes/no checkbox to determine if that record has been uploaded to the customer. I have built a query to retrieve records that have not been uploaded in order to get them uploaded at the end of the day. To upload these records we have to export them to excel and save as comma delimited. To achieve this I made a Macro to run the query and export to excel (with the autostart feature so I can go ahead and save it comma delimited).

    Now I know that is a lot to take in or read but here's my question:

    Once the macro to export has been ran is there a way to automate the process of checking the yes checkbox to determine that it has been uploaded? My only guess would be to add another macro or build on the original.

    I appreciate any helpful feedback.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    When you say 'uploaded' , do you mean an excel file (or cdv) was saved to a folder?
    then yes,

    Code:
    sub ExportFile()
    dim sMyFileName as strin 
    docmd.runmacro "mMyMAcro"
    sMyFileName = "\\folder\file.xls"
    if FileExists(sMyFileName) then
       'check the box   
    else
       'not saved
    endif
    end sub
    
    Public Function FileExists(ByVal pvFile) As Boolean
    Dim fso
    Set fso = CreateObject("Scripting.FileSystemObject")
    FileExists = fso.FileExists(pvFile)
    Set fso = Nothing
    End Function

  3. #3
    CodyL is offline Novice
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jun 2016
    Posts
    6
    Well 'uploaded' is a field header, the name is just an identifier for my boss to see if they have or haven't been processed through to the next step. I have to export the file as just an excel file as the more uncommon file types aren't available to export from Access, that is the reason I have it set to auto start on export so the file that was saved pops up without having to search it out and open it. I just save it from there as comma delimited.

    In essence what I'm trying to accomplish is to have the 'Uploaded' checkbox checked and updated into the main records table where the query grabbed them from so that when I run the query again it does not pull those records, or when the macro is run and calls on that query it doesn't save records that have already been saved. Basically to eliminate the human error possibility in forgetting to check the box and incurring data integrity issues with duplicate issue cards.

    Forgive me for being naïve but I haven't even attempted to code in Access. Will that code work for my explanation? If so would I add the code somewhere into the 'uploaded' field with the checkboxes?

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

Similar Threads

  1. Replies: 1
    Last Post: 02-17-2016, 09:56 PM
  2. Assigning Macros to Buttons using the Macro Builder
    By AccessN00bee in forum Macros
    Replies: 17
    Last Post: 10-23-2014, 08:46 PM
  3. Replies: 4
    Last Post: 02-16-2014, 06:30 PM
  4. Replies: 2
    Last Post: 06-20-2013, 11:28 AM
  5. Replies: 1
    Last Post: 01-24-2013, 11:47 PM

Tags for this Thread

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