Search results

  1. S

    How to input a string in another column based on the data in another column?

    I just tried the query method, however I am receiving error 3075. Am I doing it wrongly? CurrentDb.Execute "UPDATE Final SET EventType = IIF(Nz(AgentName='', 'IBM Director', Switch(InStr(Details, '>>>>'), 'TEC Notice', InStr(Details, 'SERVICE NOT RUNNING'), 'Wintel Services', InStr(Details...
  2. S

    How to input a string in another column based on the data in another column?

    Hi all, I need to input a string into a column named "EventType". The code should first check if the column "Agent Name" contains any strings. If there is none, it will input "IBM Director" into the EventType column. Once it has looped through the agent names, the code will then loop through...
  3. S

    How to import text file line by line?

    You're right. My data does have some inter-relations. I need it to be in the exact sequence due to the fact that I need to use another code to scan through and remove faulty data. After this, I also need to rearrange it in another table such that every 6 rows is placed within 6 columns. Maybe...
  4. S

    How to import text file line by line?

    Hi Gemma! I do need the rows to be in the right order as I'll be parsing data from it. Anyway, the method that Galaxiom worked at importing the line number and text, but I'm still not sure why some of the rows are jumbled :/
  5. S

    How to import text file line by line?

    Hi Gemma! I do need the rows to be in the right order as I'll be parsing data from it. Anyway, the method that Galaxiom worked at importing the file, but I'm still not sure why some of the rows are jumbled :/
  6. S

    Excel to Access VBA transalation

    Really sorry about this, but my deadline is in 2 weeks and this is the final problem of my project, so I'm pretty desperate. I guess I'll just work with you through PM then! Sorry, once again!
  7. S

    Excel to Access VBA transalation

    UPDATE: I tested my code on the same set of data multiple times and the number of generated records are all different. Definitely not the import problem, as the number of records matches the number of lines in the text file. So I can conclude that the problem either lies within the...
  8. S

    Excel to Access VBA transalation

    All my fields are set to "memo" as each field contains more than 255 characters. Is there a way to do the unmatch query for memo type data?
  9. S

    Excel to Access VBA transalation

    Well, I tried the importing and parsing method, and that had the best results. The problem was when I used that method on a test file, which contains maybe a thousand rows, it worked great. But when I used it on my actual file, which contains literally half a million lines, it kept giving me...
  10. S

    Excel to Access VBA transalation

    Basically, our aim was to have access parse through a text file and pull out data from it. This text files contains many events that a system experience, so it has like literally half a million lines. Each event that the system experiences is detailed within 6 lines, any more or any less is...
  11. S

    Excel to Access VBA transalation

    Hi all, My friend was able to provide me an idea on how to do my program, however, I think he's logic is for Excel VBA instead of Access. Can someone help me translate what he's trying to say into Access VBA? Open file Set arrayidx = 0 Initialize Array While not EOF Do Read file If...
  12. S

    How to count number of rows in a table?

    HAHA, glad you had fun with my problem! :) This works perfectly! Many thanks to you Chris! You are literally my hero right now :)
  13. S

    How to count number of rows in a table?

    Hi Chris, My actual data contains a string like "pear oranges apple bananas". Is there a way to change it such that it will check to see if the entire string contains the word "apple" instead of just searching if the field is apple or not? Currently, the code deletes every single row as it...
  14. S

    How to count number of rows in a table?

    Hi Christos! YOU'RE THE MAN! Your code is exactly what I needed to get me rolling :)
  15. S

    How to count number of rows in a table?

    Actually, I didn't intend to normalize my table in the first place. My re-arranging code works in the sense that: Table A's Row 1 will be placed in Table B's Row 1 Column 1. Table A's Row 2 will be placed in Table B's Row 1 Column 2. Table A's Row 3 will be placed in Table B's Row 1 Column 3...
  16. S

    How to count number of rows in a table?

    Hi! I can re-import the file, however, the text file is actually created by a system and editting it would mean editting like literally half a million lines of text. :/
  17. S

    How to count number of rows in a table?

    Yup! Treat the apple (date) as the start of a new event :)
  18. S

    How to count number of rows in a table?

    Basically, the table only has 2 columns. ID (auto numbered) and Field1. I imported a text file containing the details of all the events that happened to a system for the month. So each line in the text file is also placed into each field of the Field1 column. Each event in the text file is...
  19. S

    How to count number of rows in a table?

    Hi all, I need to write a code that checks if every 6 lines in a table contains a string. If it contains the string, then carry on looping, but if it does not, it will delete the current line and the previous 6 lines before it. The program should then continue looping through the entire table...
  20. S

    Replace null value

    Hi all, Is there a code that will replace the empty fields by shifting the bottom fields up for access? I am planning to write a code that will delete unnecessary items in my database, however, that will cause the database to have "holes" in it.
Top Bottom