I'm using the export as a backup, there is a menu option to backup data, this
in turn exports all the data in the tables to the .txt files. This is a
scoring system that is used during matches, the users use the backup to
backup the data for the current match. If they ever need to go back to a
given match then can do the restore, the program will delete the rows from
the current tables and restore them back to the match they wish to see. I
also have the users send me the .txt files if they have any problems. I then
just restore them and can check to see what there problem is.
Here is the sql of the query, I've only tested with the first time1, like is
said before the extract seems to be working fine, it's now when I try and
restore the data that I get the error regarding the field "5" not in table,
I've set the export to have no headings and have setup a spec. file for the
import but it is still coming up with the same error.
SELECT Scores.SASS_number, Scores.Shoot_date, Scores.ShooterNumber,
Scores.Division, CDbl(Format([time1],"#,##0.000")) AS Time1_, Scores.Rank1,
Scores.Misses1, Scores.Penalties1, Scores.Bonus1, Scores.TTime1,
Scores.Time2, Scores.Rank2, Scores.Misses2, Scores.Penalties2, Scores.Bonus2,
Scores.TTime2, Scores.Time3, Scores.Rank3, Scores.Misses3, Scores.Penalties3,
Scores.Bonus3, Scores.TTime3, Scores.Time4, Scores.Rank4, Scores.Misses4,
Scores.Penalties4, Scores.Bonus4, Scores.TTime4, Scores.Time5, Scores.Rank5,
Scores.Misses5, Scores.Penalties5, Scores.Bonus5, Scores.TTime5,
Scores.Time6, Scores.Rank6, Scores.Misses6, Scores.Penalties6, Scores.Bonus6,
Scores.TTime6, Scores.Time7, Scores.Rank7, Scores.Misses7, Scores.Penalties7,
Scores.Bonus7, Scores.TTime7, Scores.Totaltime, Scores.TotalRank,
Scores.Matchfinal, Scores.ClassFinal, Scores.Scored, Scores.Shootorder1,
Scores.Shootorder2, Scores.Shootorder3, Scores.Shootorder4,
Scores.Shootorder5, Scores.Shootorder6, Scores.Shootorder7, Scores.Extra_1,
Scores.Extra_2, Scores.Extra_3, Scores.Extra_4, Scores.MatchFee,
Scores.CKBox1, Scores.CKBox2, Scores.CKBox3, Scores.CKBox4, Scores.CKBox5,
Scores.CKBox6, Scores.CKBox7, Scores.DNFMDQ, Scores.Horsenumber
FROM Scores;
strive4peace said:
Hi Tom,
can you post the SQL for the query you are using to export?
from the menu when you are in design or datasheet view of the Query -->
View, SQL
if you are exporting, you need to use acExportDelim, not acimportdelim
can you explain why you are exporting? What is being done with the
exported information?
Warm Regards,
Crystal
*

have an awesome day

*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
CD said:
Now here's a funny thing when I do the import from the file menu and select
the exported .txt file it works fine, but when I do it with the
docmd.transfertext acimportdelim command it comes up with the error about the
field not being in the table. I've set the headers off in both the export
and the import command.
CD
:
Hi Tom,
use a query to do your export
field --> Fieldname_ : format([fieldname],"#,##0.000")
where the columnname is the fieldname with an underscore after it --
still looks like the fieldname but is actually different
Warm Regards,
Crystal
*

have an awesome day

*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
CD Tom wrote:
I posted an earlier question regarding the extracting for a table that has
number fields with 3 decimals, and when you extract the table to a .txt file
only 2 decimals will come across. When you do the extract using the export
command you can see that the field shows the 3 decimals but after the extract
only 2 are in the .txt file. The only way I was able to resolve this problem
was to go into the control panel of Windows XP and select the date,time,
language settings the the regional and language option and customize the
Number section to 3 decimals. Now for my question is there any way to change
that automatically using code. I have customers using the export function to
backup there data and if they have a problem to send me the backed up .txt
files. I would like to be able to change the number and then change it back
after the export is done. Hopefully someone out there will have some kind of
an answer.
Thanks in advance for any help.
CD Tom