Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,422
    I did some tweaking before you posted. Here's what I came up with (and I am talking about deleting the table as well as the list because I think you already mentioned removing the table, but not the list item). There's no error trapping and the code may not be 100% optimized but I didn't see the point in worrying about that if I was not on the right track. Table copies in sample db simply make it easier for me to retrieve a table for further testing after it has been deleted. I copy the "copy of" and rename back to the original thereby keeping the "copy of". I think the limit here is 500kb and the attached is beyond that now because of the extra tables, plus there are 2 forms - so it is zipped. One form is for viewing table on form, thereby keeping it in front of the user, the other is for just opening the table as per your original request, which would open another window. I like the datasheet in form idea better. Dbl click list item to open, click btn to delete and refresh list (form1). Refresh button is for when you copy back the "copy of" table as well as for when user does data transfer and this form is still open. You'll need to refresh the list in that case.



    See what you think.
    ImportError_v2.zip
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  2. #17
    mlrucci is offline Competent Performer
    Windows 7 64bit Office 365
    Join Date
    Apr 2018
    Posts
    202
    The inforamtion in the excel spreadsheets are coming from different programs and imported into excel. Each spreadsheet is coming from different departments. I have created vba to extract what is needed from each spreadsheet. This long/complicated and inconsistent process is being worked on to be more standardized, but will be a while as in information is obtained from multiple programs. Hence, need to make sure when importing that we capture if there are errors.

  3. #18
    mlrucci is offline Competent Performer
    Windows 7 64bit Office 365
    Join Date
    Apr 2018
    Posts
    202
    Perfect!!!! That is it! I really appreciate your help. I am trying to understand what you did. I reviewed all your code and all of it makes sense except for the row of Me.sfmTable.SourceObject = "table." & Me.List0.Column(0).

    Me.sfmTable.SourceObject sets the source of the sfrmTable as the selected table from the list. Perfect!
    "table." does this set the unbound field to a table and then & Me.List0.Column(0) tells you which table?

    This is the thing about learning, you never stop! This is why I love doing this! If what you did was what I think you did, didn't know you could do that.

  4. #19
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,422
    "table." does this set the unbound field to a table
    Not quite. If you open the form in design view, select the subform control and on the property sheet drop down the Source Object choices you'll see that the choices are listed with the type of object preceding the object name; i.e. the name of a table is prefaced with "Table.", form with "Form." etc. So I used the reference of the object type ("Table.") followed by the reference to the listbox value (which is the value of the selected item). Note the period/dot is part of the first reference. Using concatenation, what I constructed was "Table." & the name of the table returned by the listbox selection - Table.testImportErrors - much the same as what you see in the property sheet.Does that clear it up for you? If not, you might want to research 'ms access vba concatenation'
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #20
    mlrucci is offline Competent Performer
    Windows 7 64bit Office 365
    Join Date
    Apr 2018
    Posts
    202
    Makes sense. Thanks for the clarification! You are a big help really appreciate it.

  6. #21
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,422
    NP. Glad I was able to help. If an issue arises, you can always resume this thread.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 03-30-2019, 05:37 AM
  2. Replies: 8
    Last Post: 12-13-2017, 10:38 AM
  3. How To Allow A Button To Open The Value List
    By DigitalAdrenaline in forum Access
    Replies: 7
    Last Post: 08-19-2016, 06:24 AM
  4. Open Link Table list with VBA?
    By AccessMasterFromTheStart in forum Import/Export Data
    Replies: 0
    Last Post: 02-26-2012, 04:12 PM
  5. Open website from list box
    By kev921hs in forum Programming
    Replies: 4
    Last Post: 05-24-2010, 01:43 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