User Profile

Collapse

Profile Sidebar

Collapse
chadh
chadh
Last Activity: Oct 20 '08, 12:58 PM
Joined: Sep 22 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Well, I got of working exactly as I wanted. I used a make table query to get my temporary table and added and autonumber column to it. Then, using a hb command button, I clear the temp table, use an apped query to populate it and another query that uses the count command to give the sequential row numbers and a final command to export out to a csv file. So far it looks to be working great. Still need to do a bit more testing, but I'm confdent it...
    See more | Go to post

    Leave a comment:


  • Ok, so lets try a different approach. Could I create a 'temporary' table and populate it with my query? Then, add an auto number (1 through the total number of records) to the table and run a new select query on that temporary table that just returns everything in it (ordered by the new auto number), export that query to the CSV file and then delete the temporary table.

    I presume, if this is feasible, it could be scripted in VB and...
    See more | Go to post

    Leave a comment:


  • OK, so I need to find a way of making a new field that contains a unique value for each line. If I did this with an expression, lets say concatenating two other fields into new one such that it is unique, could I then use that with the count function?

    This seemingly-simple thing has turned into a major roadblock for my project.

    I've read that record numbers or an auto-incrementing number could be added to a report....
    See more | Go to post

    Leave a comment:


  • chadh
    replied to Export MS Access Query to CSV File
    Creating Line or Row numbers on query results
    See more | Go to post

    Leave a comment:


  • chadh
    started a topic Creating Line or Row numbers on query results.

    Creating Line or Row numbers on query results.

    I have two select queries that need to have a column of line numbers on them. The numbers need to simply be 1 through however many rows there are in the result set. With the data I'm using the result set usually under 100 rows for each query. I've read solutions that involve using the primary key field and a COUNT function. Those have not worked for me as my data set comes from a linked CSV file with no primary key. I'm using a linked CSV file...
    See more | Go to post

  • chadh
    replied to Export MS Access Query to CSV File
    Just wanted to let you know the problem has been resolved. I hard-coded values into the queries and was able to export them using the wizard and create the Export Specs. That combined with using the cstr() on the form values. Has given me exactly what I want.

    No I just need to figure out how to make line numbers on two of the queries. But I'll start another thread for that one.

    Thanks again for your help,
    ...
    See more | Go to post

    Leave a comment:


  • chadh
    replied to Export MS Access Query to CSV File
    I have some new information. In the query, I wrapped the parameters inside the cstr() function and they exported as text and not the unicode, which in fact was binary. The purpose of these form values is not selection criteria. I need a way of putting user-defined text with each record. The original data set is a linked table that will change frequently. This information is not included in the data set, it is the same for each record. For example,...
    See more | Go to post

    Leave a comment:


  • chadh
    replied to Export MS Access Query to CSV File
    Yes, that's the strange thing. The form is open with data entered. When I run the query and get a data table (with the parameters showing as expected), so the references to the form must be correct. My only guess is perhaps this is a bug in Access. I'm running Access 2003 SP3.

    Chad
    See more | Go to post

    Leave a comment:


  • chadh
    replied to Export MS Access Query to CSV File
    Thanks for your help. I think some of my problem lies with trying to insert the text parameters from the form into the query. My guess is I'm trying to do something Access really doesn't support. Since, I'm trying to add these parameters into the query, I cannot use the import/export wizard on the queries I actually want to export because when I run the wizard I get prompted "Too few parameters. Expected (2)." Normally, when I run the...
    See more | Go to post

    Leave a comment:


  • chadh
    replied to Export MS Access Query to CSV File
    Thanks for the reply. I'm executing this export from a command button in my form. I have tried doing a manual export on my queries, however, the manual export does not work. I get the error there are too few parameters. For whatever reason, when doing the manual export, the queries do NOT pull the parameters from the text boxes in my form. I can't explain this activity.

    Using a query with no parameters, I went into the advanced...
    See more | Go to post

    Leave a comment:


  • chadh
    replied to Export MS Access Query to CSV File
    Thanks for the information. Not really sure how to proceed with the unicode issues.

    One further bit of information I have found:
    I have two queries that generate basically the same result set. The difference is that one of them has an expression to make one field negative. These two queries are then run as a union to generate a set that contains a positive and negative value. The purpose is that when the result csv is...
    See more | Go to post

    Leave a comment:


  • chadh
    started a topic Export MS Access Query to CSV File

    Export MS Access Query to CSV File

    Hello, I'm having some troubles exporting a query to a csv file. I am able to use the doCMD.TransferT ext to output the query to the csv file, however, I cannot get it to use the Export Specifications and on some queries data is showing up in what looks like HEX. Below is an example:

    SQL Statement for Invoice_Header Query:
    Code:
    SELECT [Forms]![Form1]![Invoice_ID] AS inv_id, [Forms]![Form1]![Trans_Date] AS tran_date, Sum(Item_Lot_Query.total_gross)
    ...
    See more | Go to post
No activity results to display
Show More
Working...