Search results

  1. G

    VBA Code to use the MS Access Import Wizard

    OK maybe I am not understanding the code that's out there and I apologize, in advance here, if some of you have already provided the answer and I am just not getting it. What I've seen in my searches is: I can use code to go out and manually choose a file, using the Application.FileDialog...
  2. G

    VBA Code to use the MS Access Import Wizard

    Ugh! I've honestly looked for a very long time; perhaps I am just a horrible web investigator (likely). I have come across many posts on how to use VBA to navigate to a spreadsheet file for import, but none that show how to programmatically access the Import Wizard, so I can choose the...
  3. G

    Alter a table's Data Type based on the data within the field

    Yes, basically I will never have any idea what the data will be in field1, field2, field3...etc... I want to loop through the data in table1.field1 and check that data using TypeName(). If the data in field1 is say: all Integers... then I want to change the field's data type to "Number"... Or...
  4. G

    Alter a table's Data Type based on the data within the field

    I have some tables that do not import correctly. Essentially, instead of posting the correct data type, all fields are pulled in as text values. What I want to do is loop through the data in each field and reset the Data Type (for each field) based on the data within (which is currently...
  5. G

    Code question

    This is a long way to do it with just the GUI... I'd create a query that groups [Sample description] and [Responsible] (it's the same as distinct) Save it and call it something (lets just say Q1) Then I would pull Q1 into a new query and drag down the field [Sample description] Twice so ...
  6. G

    Connect with ADODB connection - dissapearing fields in columns

    The single quote tells Excel that it's a text field... I was actually going to tell you to look for the single quote character in the cells with data. I wouldn't have thought to add it to the first record. Hmm... I don't know... I guess MS Access needed the quote to post the field as text... I...
  7. G

    Connect with ADODB connection - dissapearing fields in columns

    I am not sure why that's happening, but try this: Instead of choosing to "Import" the file, choose to "Link": Meaning from Access: Click the External Data tab on the ribbon>>Excel Then choose the radio button: "Link to the data source by creating a linked table" Then once you have the Excel...
  8. G

    Embed Files into MS Access?

    So I managed to attach an Excel Chart Template file into a table, then download that file to a specified place in on my computer using VBA from the site I linked above...but just in case the site goes down, here's the code I used to download the file: Public Function SaveAttachments(strPath As...
  9. G

    Embed Files into MS Access?

    Looks like this site gets you what you need, as far as the "attachment" data type goes: http://sourcedaddy.com/ms-access/working-with-attachment-fields.html I'll mark this solved, if the code in there does what it claims to do...
  10. G

    Embed Files into MS Access?

    Thanks Doc Man... I don't think the attachment size will be an issue... But I don't know how to programmatically download/detach the file I've posted within the attachment field of the table. I basically created a table I call "TEMPLATE ATTACHMENTS" with one field (datatype = Attachment) in it...
  11. G

    Embed Files into MS Access?

    Hmm... I can add file attachments in a table? I didn't know that... seems promising... Very cool... just googled it... seems like that will work, thanks. I may come back with VBA questions as to how to detach files from a table... but hopefully the internet will have the answers! Thanks so...
  12. G

    Embed Files into MS Access?

    I have an MS Access tool that pushes out Excel Spreadsheets... The VBA references an Excel Chart Template to format the graphs which get created via. the VBA code. My issue is that I have to send the user about 4 chart templates for them to load, manually, to a specified Folder/Directory...
  13. G

    Checking Node of a TreView Control

    MarkK... I think that's what I need... so if MSComctlLib.Node returns zero... then it would be the last node in the hierarchy... I guess...?
  14. G

    Checking Node of a TreView Control

    So I have a Treeview control. When the user clicks a node, I want to check to see if that's the last child in the hierarchy (i.e. the node has a parent, but is not a parent of any other node). Is there any easy way to do this? I still haven't wrapped my pea-brain around this recursive logic...
  15. G

    Object With Variable not set

    Thank you both for the replies. Adding xlApplication.Selection.Font... and so on throughout (i.e. wherever there's a "Selection.XXX"), seemed to do the trick. The funny thing was that I thought I had tried that and it didn't work... so I was about to write back and say no... but I tried it...
  16. G

    Object With Variable not set

    [SOLVED] Object With Variable not set I am trying to format an open Excel Spreadsheet from MS Access using VBA. My issue is I run the code once and it runs fine... then I run it a second time and it gives me the Runtime 91 error: Object Variable or With block variable not set... If I then run...
  17. G

    Tree View Control Question

    OK I see where the properties of the control doesn't give you all the possible event choices. If you go into the VBA Scripting section then choose the TreeView control from the dropdown on the left, and then choose the dropdown on the right there's a whole slew of events you can choose, one of...
  18. G

    Tree View Control Question

    Thanks for your help Minty, I am not sure how to use that snippet of code you posted, or where to put it...I am kind of new to using activeX controls. I only show 5 events in the properties of the TreeView control itself... I don't see a "NodeClick" event... or any type of "click" event...
  19. G

    Tree View Control Question

    So I figured out the treeview and now it works just great... I can traverse my hierarchy just fine... now how can I use this? Is the treeview just a visual, or can I actually utilize the data I am clicking on within? What I want to do is to be able to choose a specific hierarchical path and...
  20. G

    Linking tables with a partial field

    One issue I see here is that you aren't really telling us what you mean by partial. If there's always a dash separating the large number, then (in order to get the partial) you could do something like: Mid([PARTNUMBER], 1, Instr([PARTNUMBER], "-") - 1) to give you everything up to the dash (i.e...
Back
Top Bottom