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 dencom 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 feipezi

  1. feipezi

    Do we have a VBS version of listing files in a folder?

    Hi, There is a function 'filelist' on the web in Excel macro but I am looking for a similar func with VBS, which can be run in Window Explorer. Thanks in advance. Here is the Excel macro/function 'FILELIST'. Function FileList(fldr As String, Optional fltr As String = "*.*") As Variant...
  2. feipezi

    How to make a recorded Excel macro (convert a text file to a Workbook) more efficient?

    Thanks folks for your reply. Andy, sorry that I cannot provide samples due to company policy, which is getting stricter and stricter. We all know nobody can take a few lines of data to perform fraud... combo, I tested your code. It should be working but the TXT file that I used has no specific...
  3. feipezi

    How to make a recorded Excel macro (convert a text file to a Workbook) more efficient?

    Hi, I recorded a macro that can convert a text file into an Excel workbook. But the code looks messy with quite some redundant statements. I tried to streamline it but with no success. Like the Arrays, do we need that many arrays? Besides, what if I have more than 30 fields? That being the...
  4. feipezi

    How to get the macros back as they vanish somehow in a AccessDB?

    Hello combo, please see my comments below, in upper case. I understood that your recent database has no macros (i.e. at least VBA, as you checked this in VBE), with recent data from May. You have older copies, working, latest with April data. I am right? YES, YOU'RE RIGHT. I'M RUNNING JUNE...
  5. feipezi

    How to get the macros back as they vanish somehow in a AccessDB?

    Hello dHookom I tried your way but did see any hidden macros. I will keep checking because the size of the DB is bigger than expected. I still suspect there be some old macros hidden somewhere. Hey combo, I understand what you recommended. But the fact is the new data is supposed to be created...
  6. feipezi

    How to get the macros back as they vanish somehow in a AccessDB?

    Thanks combo for the quick response! I can certainly try what you suggested. But the old (or the problematic DB) has no macros any more. It means I need another similar DB where macros are residing to be the source so I can copy the macros over to the new DB, correct? Btw, after I copied the...
  7. feipezi

    How to get the macros back as they vanish somehow in a AccessDB?

    Hello folks, I have an AccessDB with a size of abound 30 MG. There are tons of macros in it. I am responsible for running some production jobs at the beginning of a month. A few associates did the similar thing a few days ago. As I took over, I found none of the butotns, back up by some macros...
  8. feipezi

    Hoe to fix run time error 2147217900 (80040e14) syntax error in Order By clause

    Hello combo, I need more help from you. You can see the code below. I have 10 data tables to be checked out making sure those tabs are updated, i.e., having the latest data. But each tab has different date to check on. The example below shows TERM_START_DT; others may have RUN_DATE or...
  9. feipezi

    Hoe to fix run time error 2147217900 (80040e14) syntax error in Order By clause

    Hello, I cannot figure out what's wrong with the syntax on the SQL statements. It's not a complicated process, is it? All I want is to check out if the input dataset has been updated. So I can run my process if it has. The query that I ran was in Excel ADO. But the dataset resides in MS...
  10. feipezi

    How to pull data from MS Access DB and place on an Excel spreadsheet with WHERE clause?

    Sorry Andy. I was out of town. Some more questions. Sub ExportAccessDBtoExcel(dsn As String, DTE As Long) ... ConnCmd.CommandText = "SELECT TOP 50 * FROM " & dsn _ & "ORDER BY " & DTE & "DESC" ... Sub tnt() ExportAccessDBtoExcel "CO_PNC_CO_RPT_NBEXTRACT", TRANDATE End Sub got error like...
  11. feipezi

    How to pull data from MS Access DB and place on an Excel spreadsheet with WHERE clause?

    Hey guys, Thanks for the up date. Now I have another question for you. I set up the small process years ago but unable to remember how come there is no header in the output. Could you help me create the header in the output? Thanks again. Sub GetData_From_Workbook() Dim jqzConnect As String...
  12. feipezi

    How to detect dups and/or sum by group?

    Hi, Is there any way of combining the following two Subs into one? Or it looks messay. Thanks. Sub SumByGroup(keyfield As String, datacol As Integer, destcol As Integer) 'keyfield: the field of key, datacol: Offset number, if keyfield is "a" then datacol=2 means data in field "c" 'destcol...
  13. feipezi

    How to pull data from MS Access DB and place on an Excel spreadsheet with WHERE clause?

    Thanks Andy for the quick return. I ran your code with minor modifications. But I have zero output. The snapshot that I attached is from the DB table that does have the records that satisfy the WHERE clause condition. But I can output the whole Access table if remove the WHERE clause. So the...
  14. feipezi

    How to pull data from MS Access DB and place on an Excel spreadsheet with WHERE clause?

    Hi, Not sure if the subject is more like supposed to be in the fields of Access forum but the destination is in Excel. Please forgive me if I came to the wrong site. I copied a part of the code from Youtube but I need to set up a query to output a small subset of data from an Access table (the...

Part and Inventory Search

Back
Top