473,396 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Export a table but increment the name

31
I posted a question simalar to this before but was not clear on what I was trying to do. I am using two tables one primary and a temp table. I import my data to the temp table and bounce it against the primary table and append the primary table with the new data for export. The problem is I have set a command button to do this and if the user selects the button twice the name of the output.txt file is then zero. I need to add an increment number or letter to the output name. Is this possible. I have tried the date but that still will not work if I export 2 or more files the same day.
Thanks,
Wayne L
Nov 8 '07 #1
3 1405
Rabbit
12,516 Expert Mod 8TB
What about using Date and Time down to the second?
Nov 8 '07 #2
Wayne L
31
Here is what worked for me.


Expand|Select|Wrap|Line Numbers
  1. Private Sub Export_text_Date_Click()
  2. 'TheDate = Month(Date) & "-" & Day(Date) & "-" & year(Date)
  3. TheDate = (Format(Now(), "yymmdd-hhmmss AM/PM")) & ".txt"
  4. TheFile = ("C:\FSMFILES\A4A\A4A ") & TheDate & ""
  5. DoCmd.TransferText acExportFixed, "Import/Export SPECS", "YourTbl",(TheFile), False
  6. End Sub
  7.  
Wayne L
Nov 9 '07 #3
Rabbit
12,516 Expert Mod 8TB
Glad you got it working.
Nov 9 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: jaks | last post by:
How can I export a MySQL table with a different name using phpmyadmin? I want to export nuke_bbsearch_wordmatch and all it contents to phpbb_search_wordmatch This table in a different db. ...
4
by: Paolo | last post by:
Hello, I am trying to create a procedure to export my Access data to a word template. I would like to export data from two tables to a word file at the same time. My two tables are named CASES...
1
by: Ted Theodoropoulos | last post by:
i posted an earlier thread about exporting data from a subform in an ..ADP to an .MDB file. i had only one gracious response but it wouldn't work in the given situation. so i thought i would...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.