Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by DougTucker

  1. DougTucker

    Calling Same Function Simultaneously from Access macro

    I have an MS Access macro that calls a VBA function several times in a row and I'm getting incorrect data in some of the fields. I suspect that the function is collecting the results for the first call, then the function is being called again, and might be sending back the results from the 2nd...
  2. DougTucker

    Function to count values from one range if value exists in other range

    Hi All: I'm working on an Excel spreadsheet where I need to compute values in several hundred cells, and the formula will vary depending on the values in the first few columns. I think the best way to accomplish this is through a formula that would spin through each range. Here's the general...
  3. DougTucker

    Import CSV to New Excel Worksheet (QueryTables)

    Thank you, Skip and Hugh! Both of your ideas work. What I found so far is that if I set "TextFilePromptOnRefresh = True", it accomplishes the necessary prompt in a generic "File Open" window. If I set it to False and feed my own prompt code I can customize it with a header label, and prompt...
  4. DougTucker

    Import CSV to New Excel Worksheet (QueryTables)

    I need help on a "QueryTables" module that prompts the user for a .csv file name, then imports it into the current worksheet. The file will be ";" (semicolon) delimited. I've created the basic code using the RecordMacro feature, but I can't get it to work with the prompt for a file name...
  5. DougTucker

    How to Suppress Hidden Form Fields in Excel When Printing

    I didn't see the property "Move with Cell". I fixed it by changing the type of check-box that I'm using. Rather than using the check-box available in Design mode, I used the check-box available on the Forms toolbar. That one has a different set of properties and (although I don't fully...
  6. DougTucker

    How to Suppress Hidden Form Fields in Excel When Printing

    Skip, The problem is not just that they show up when I don't want them to (i.e., when I print). The bigger issue is that the fields MOVE when I print. On the screen they hide and re-appear just fine. When I print, ALL check-boxes get clustered to the bottom of the worksheet, then when I...
  7. DougTucker

    How to Suppress Hidden Form Fields in Excel When Printing

    I have an Excel workbook with a combo box to choose a value. The form triggers VBA to selectively hide or display certain rows that apply to the selection (the rows contain groups of check-boxes that are also hidden with the rows). This works fine on the screen, but as soon as I print the...
  8. DougTucker

    Function with Variable Column: Item not found in this collection

    I have this working well now. My next step is to call it from a macro, where I'll specify each of 4 column names (one at a time). Here's the code for anyone else's use. Adjust as needed, especially the value "MyTableName". Thank you all for your help. ~ Doug T. Function...
  9. DougTucker

    Function with Variable Column: Item not found in this collection

    Thank you! That did it. Later I needed to save the data to a column [TextBlockName] + [Counter] (ex: "Free Format Instructions1" and I used the following: RowContents = StringArray(Counter) rst.Edit rst("[" & TextBlockName & Counter & "]") = RowContents rst.Update Thanks for your...
  10. DougTucker

    Function with Variable Column: Item not found in this collection

    Joel, I added the debug, and when running "RowsToColumns("Free format instructions")", it shows that the variable [textblockname] does come into the function as "Free format instructions". It's still getting hung up translating this from a string value to a column value. If I try to create a...
  11. DougTucker

    Function with Variable Column: Item not found in this collection

    I just tried that (rst.Fields![TextBlockName]) and it still produces the error. Do I need to store the whole string as a calculated value before I refer to it?
  12. DougTucker

    Function with Variable Column: Item not found in this collection

    The following code is producing the error "Run time error 3265, Item not found in this collection". The comments sum up what the code is intended to do. It produces the error when I pass the value through the function using the function RowsToColumns("Free Format Instructions"), and the...
  13. DougTucker

    Retrieve Prior Non-Null Value from Table

    Given the size of my data, the module from PWISE works really well. The query alone (with DLOOKUPs) took over an hour. The module took about 15 seconds. The only change I had to make to the code (other than customizing the variable names) is to add "rst.Edit" before "rst!Company=Company"...
  14. DougTucker

    Retrieve Prior Non-Null Value from Table

    The solution by Dhookom works fine for small data sets, but with my table of several 1000 records it's getting bogged down (takes over an hour to generate the data and append to a new table). I'll try the code that Pwise posted. I'll let you know how it works. ~ Doug T.
  15. DougTucker

    Separating Text Field into Columns at Line Break

    The above solution (from PHV) works well, except that it's a resource hog for my larger data sets. It's fine for a 100+ row query, but some larger records have several thousand rows, and it's taking over an hour to process the data. Right now I have a query with a value "WholeString" (Column...

Part and Inventory Search

Back
Top