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 bkrike 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 brainmetz

  1. brainmetz

    SQL Expression Question

    Thanks your secondone worked...i just had to change my data type from Memo to text with 255 characters. The first one returned the same error as I had before. Thanks alot.
  2. brainmetz

    Query Question

    Everytime I run the following code: SELECT (All_Urls.[Computer Name]), (-1 * (All_Urls.[URL Address] LIKE '*att*') * Sum (All_Urls.[SumOfTotal Time])) AS [SumOfSumOfTotal Time] FROM [All_Urls] GROUP BY (All_Urls.[Computer Name]); I recieve an error stating: You tried to execute a query that...
  3. brainmetz

    SQL Expression Question

    Everytime I run the following code: SELECT (All_Urls.[Computer Name]), (-1 * (All_Urls.[URL Address] LIKE '*att*') * Sum (All_Urls.[SumOfTotal Time])) AS [SumOfSumOfTotal Time] FROM [All_Urls] GROUP BY (All_Urls.[Computer Name]); I recieve an error stating: You tried to execute a query that...
  4. brainmetz

    dlgCommon.ShowOpen Question....

    I have this in a module called import: Public Function Import_Data_Enter() Dim strFileName As String ' you could make this global if need be dlgCommon.ShowOpen strFileName = dlgCommon.FileName If strFileName = "" Then End DoCmd.TransferText acImportDelim, "import&quot...
  5. brainmetz

    Transfer Text command

    Just to let everyone know, I figured it out... If you recieve the error that I did, you need: DoCmd.TransferText acImportDelim, "import", "Activity_File", strFileName instead of this: DoCmd.TransferText acImportDelim, "import", "Activity_File&quot...
  6. brainmetz

    Transfer Text command

    I did what you said: 1. Rename Activity_File to Old_Activity_File 2. Create a new table called Activity_File from using imported data. Also make a import specification called import. 3. Delete new table and rename old table. Here is my new code: DoCmd.TransferText acImportDelim, import...
  7. brainmetz

    Transfer Text command

    Your answer makes alot of sense, just a quick question for you: I have the names of the database exactly what I need...But for being easy lets just use F1, F2, etc... How would I program it so that I could import. I really dont want to change the program that is exporting the data...That...
  8. brainmetz

    Transfer Text command

    Everytime I run this code, DoCmd.TransferText acImportDelim, , "Activity_File", strFileName, False I receive the followin error: Run-Time Error '3066': Query must have at least one destination field. The problem that I cannt figure out is that Activity_File is a table not a...
  9. brainmetz

    Programmatically import text file into Access

    if I put strFileName in quotes, I recieve: you can not import this file. Thanks.
  10. brainmetz

    Programmatically import text file into Access

    The error I recieve is: Run-time error 3066 Query must have at least one destination field. BTW...I don't have a query named Activity_File just a table.
  11. brainmetz

    Programmatically import text file into Access

    The contents of strFileName is: C:\Program Files\mydirectory\export\activity\myfile.txt myfile.txt is the file I wish to import... It is reading it in correctly. Thanks for everything
  12. brainmetz

    Programmatically import text file into Access

    Just so that everyone can see I am trying here is my code: Dim strFileName As String ' you could make this global if need be dlgCommon.ShowOpen strFileName = dlgCommon.FileName DoCmd.TransferText acImportDelim, , "Activity_File", strFileName The DoCmd.TransferText is suppose to...
  13. brainmetz

    Programmatically import text file into Access

    First of all I dont think you are copping out...I believe in reading/doing research before asking also. But, I guess I do not truly understand the TransferText method. I tried the TransferText but I had to specify an exact name. I tried to call the strFileName but it said that i must use an...
  14. brainmetz

    Programmatically import text file into Access

    I wanted to thank both of you for your responses...They helped out a great deal...I now have the open dialog box, but how do I call the import function, so I can import the file that I can now select? I need to import the file that is selected into table1... Thanks, Shane
  15. brainmetz

    Programmatically import text file into Access

    Like the title says i need to programmatically import a text file into access. I found that I can do this from File->Get External Data->Import. I also found the macro code for transfer text. Transfer text would work except that my file name that I import from changes. For instance the name...

Part and Inventory Search

Back
Top