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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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?
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...
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"...
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.
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.