Re: Code Efficiency Suggestions
- From: "Job" <Job@xxxxxxxxxx>
- Date: Fri, 10 Jun 2005 15:21:42 -0600
Nick Thanks for the Code! I have a question, when determining the 'Fund' in
Excel I have to use an offset as it is two lines below and it doesn't tell
the fund on the actual line of the fund number. When we clean the
irrelevant lines of code, we now no longer know where the fund is..for
example in the clean column you'll see something like "This is the fund
description ZO09876" the "This is the fund description" can be anything so
it would be difficult to key off of any type of text there. If you just set
the column to extract the last word in that column, you'd also get all kinds
of other data as that column contains most of the relevant data. Any
thoughts?
"Nick Hebb" <n.hebb@xxxxxxxxxxx> wrote in message
news:1118429224.958596.264920@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Part II:
>
>
> 8. Create another query and select tmpParsedInputData in the Show table
> dialog. Select all the fields from tmpParsedInputData and drag them
>
> into the fields area. Go to Query on the menu and change the type to
> Append query and select your target table as the table to append to.
>
> Access should automatically figure out which fields append append
> where, but you'll want to double check. Save the query as
>
> qryAppendParsedInputData.
>
> 9. At this point you're ready to run the append query, but you should
> be extra cautious. It's really easy to screw up data in a flash with
>
> databases, so you should test everything first. I would make a copy of
> the original target table and change the target table in the append
>
> query to the copy. Run the append table and check the effect on the
> data. Then I would import the data into the original table using your
>
> traditional method. Then, create a find unmatched query using the
> query wizard and verify that all the records created with the new
> method
>
> match the records created with the old method. If it all works, change
> the target table in the append query back to the original target
>
> table (instead of the copy).
>
> 10. Create a new query and save it as qryDeleteInputData. In SQL view
> paste the folowing:
>
> DELETE tmpInputData.Col1
> FROM tmpInputData
> WHERE (((tmpInputData.Col1) Like "*"));
>
> 11. Go to the macro screen and create a new macro. Add the following
> Actions
> - OpenQuery (query name = qryDeleteInputData)
> - DeleteObject (type = table, name = tmpParsedInputData)
> - TransferText (specification name = to the one you saved earlier, file
> name = your source file, table name = tmpInputData)
> - OpenQuery (query name = qryCleanInputData)
> - OpenQuery (query name = qryMakeParsedInputDataTable)
> - OpenQuery (query name = qryAppendParsedInputData)
> - DeleteObject (type = table, name = tmpParsedInputData) ' run again to
> clean up
> - OpenQuery (query name = qryDeleteInputData) ' run again to clean up
>
> You might also want to Repair and Compact the database since theiur was
> a lot of data created and deleted:
> - RunCommand (command = RepairDatabase)
> - RunCommand (command = CompactDatabase)
>
> Save the macro and you're set.
>
.
- Follow-Ups:
- Re: Code Efficiency Suggestions
- From: Nick Hebb
- Re: Code Efficiency Suggestions
- References:
- Re: Code Efficiency Suggestions
- From: Nick Hebb
- Re: Code Efficiency Suggestions
- From: Job
- Re: Code Efficiency Suggestions
- From: Nick Hebb
- Re: Code Efficiency Suggestions
- Prev by Date: Re: Excel Addins Not Loading on Start
- Next by Date: RE: busted workaround for 255 character limit in cells
- Previous by thread: Re: Code Efficiency Suggestions
- Next by thread: Re: Code Efficiency Suggestions
- Index(es):
Relevant Pages
|