Search results

  1. G

    Save-As on accdb file Open

    Looking for code that does this: When I open a specific accdb file, I am automatically prompted to save this file as... Basically some autoexec code in the file itself that prompts me to save that file each time it's opened. Thanks so much! Gary
  2. G

    String search for a literal Double Quote

    I have an SQL (string) variable named: strSQL. I am trying to use an inputbox (or even a textbox) to manually alter the SQL code and change the QueryDef. So (let's just say for the "Where Clause") I have something like: strSQL = inputBox("Enter Where Clause") The issue is, the InputBox...
  3. 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...
  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

    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...
  6. 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...
  7. 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...
  8. 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...
  9. G

    Trailing spaces problem

    Trailing spaces problem [SOLVED] So, I pull some data into a recordset (I call: rsSTART), then I create a table using VBA open it with another recordset (I call: rsBUILD_A) All I am trying to do is use positional logic to fill the data from rsStart into rsBUILD_A. The problem is, when I push...
  10. G

    Evaluate #Error???

    Does anyone know if there's a way to utilize the "#Error" message that comes up in queries as a result of data type issues? Meaning is there a way to filter on or omit the data that results in a #Error? I have a bunch of string values that denote, what they call, an Assetnum... although it's...
  11. G

    Export a table from accde to accde file

    Essentially I am trying to find a way that I can have users send me a table without them being able to fiddle with it. I figure an accde file would work for this endeavor. What I'd like to do is have an "export button", where the OnClick event, exports a single table into a new accde file. This...
  12. G

    The OpenForm action was canceled

    I have a form that opens when you initially open the MS Access file... This first form posts session and user ID data to a sessions table, then closes itself and opens an end user form (i.e. the main form in the application) It's work just fine for many weeks, up until a few minutes ago. Now...
  13. G

    Text box Percentage format

    This thing has gotten to the point where it's starting to drive me nuts. I have set the format of a text box (named: scrILS) to percentage. It shows on the form as 0.00% When I try to run calculations off of it like: = [scrILS]*[totBuysFYDP1], it throws this error: #TYPE! It seems as though...
  14. G

    Dis/re-engage Form's bound table?

    What I want to do is run an action query (i.e. make table query) using VBA from an OnClick event procedure to overwrite a table. The kicker is, the button I am clicking is on a form that is bound to the table I am trying to overwrite. Is there any way to disengage the form's bound table...
  15. G

    Access to Excel error (every other run)

    I keep running into this same issue and it's driving me nuts. I have an Excel workbook with a Pivot Table in it. Basically all I want to do is push data from an MS Access query into an Excel worksheet and then refresh the pivot table. I need to do this all from an MS Access form. With a button...
  16. G

    Clipboard usage

    I can copy (Ctrl+C) a list of data from wherever and post that into a string variable strVal. When I run MsgBox(strVal) It shows me the list I just copied... as a list. What I'd like to do is append the data from this string variable (i.e. strVal) directly into a table as a list (i.e. each...
  17. G

    Cut and Paste a list into a bound table

    I am trying to make a little tool using access. I want to take a list (excel, flat file, access table, whatever...) past it into a table then click a button and have access spit out an IN() function. That way, whenever I have a list I want to throw into the criteria section of a query (SQL...
  18. G

    Throwing errors every other run...

    I am using MS Access VBA to create and excel spreadsheet and format the sheet from MS Access. When I run my code, it runs great and I get the formatted report exacly as I wanted. Then when I run it again, it throws an "Object Variable or With Block Variable not set" Error. So my code runs from...
  19. G

    Null Value messing up form criteria in query

    I have a dropdown combo box in a form. On the dropdown listing, you can choose any item or “all” the items. If you choose “ALL”, the query that the form is bound to post the field name, itself, to the criteria for the field. I don't know a better way to word that, but its hard for me to follow...
  20. G

    Runtime error '2465' : can't find the field '|1' referenced

    Sorry I originally, accidentally, posted this in the Macros section... when I meant to post this here: I keep getting this error: can't find the field '|1' referenced to in your expression Here's where it bugs out: [qryBuyPlan_Working subform1].Form.RecordSource = "SELECT BUY_PLAN_ID...
Top Bottom