vb123.com

Garry Robinson's Popular MS Access, Office and VB Resource Site

 

Home  Contact Us
Order our Software

RSS & Newsletter  
Join our XML/RSS Newsfeed or sign up for our informative newsletter on Office Automation, Access and VB topics
Read More

Get Good Help
If you need help with a database, our Professionals could be the answer
Read More

  Is Your Database Corrupt ?
If you have a corrupt database, Try our Access Recovery service

The Workbench  Find out who has your database open, start the correct version of Access, easy compacting and backups, change startup options, mde compile,  shutdown database Read and Download

The Toolshed 
Searchable help file comprising of all the information at vb123.com plus hidden downloads etc. Read More



The Toolbox

Libraries of software that we regularly import into our projects. This is a newer version of the Toolshed More..


Access >>> SQL 
Upsize to SQL Server 2005 or 2008, easily repeated conversions, highly accurate SQL query
translation and web form conversion.
Read More

SharePoint
For our company file sharing and task management, we use
SharePointHosting

DryToast 
Backup and query your BaseCamp
® projects
Read More


Datamining/Graphs

Explore your data with this versatile graphing and data mining shareware tool.  Read More

Garry's Blog
Find out a few other things that Garry has been writing about Microsoft Access. Read more

Like FMS Products?
Purchase them from us and get a free Workbench or Toolbox  More

About The Editor Garry Robinson writes for a number of popular computer magazines, is now a book author and has worked on 100+ Access databases. He is based in Sydney, Australia
Contact Us ...

Search ...

or try our new site built with SharePoint Designer
 vb123.com.au
 

 

Next Tip   Access 2000/2002/2003 Export To Text Bug/Safety Measure

After a frustrating afternoon trying to work out why exporting to text was failing after converting a database from Access 97 to 2000, this page will demonstrate what you will need to do to solve the problem.

If you are visiting this page, you are probably searching for the words "export database or object is read-only". Anyway the problem is caused by using a file type that is not allowed by Access 2000. Some posts on this issue indicate that you can change the registry to fix this problem, if you find the right registry entry, please let us all know.

Anyway in the following code, you will see how to export to a file using the txt extension followed by a rename of the file to a new extension (str) using the Name method. This solves the problem in a roundabout way.


Private Sub cmdXFaceSurpac_Click()
On Error GoTo Err_cmdXFaceSurpac_Click

Dim DocName As String
Const STRINGFILE As String = "face1"
Const TEXTEXT As String = ".txt"
Const STREXT As String = ".str"
DocName = "FX_XtheFaceSurpac"

DoCmd.TransferText acExportDelim, "FX_surpac", DocName, _
 Me![txtFolder] & STRINGFILE & TEXTEXT, True, ""
 

Kill Me![txtFolder] & STRINGFILE & STREXT
Name Me![txtFolder] & STRINGFILE &
 TEXTEXT As Me![txtFolder] & STRINGFILE & STREXT
MsgBox "Transfer to " & Me![txtFolder] & STRINGFILE & STREXT & " is complete.",    vbInformation, "Surpac String File"

Exit_cmdXFaceSurpac_Click:


Exit Sub

Err_cmdXFaceSurpac_Click:
MsgBox Error$
Resume Exit_cmdXFaceSurpac_Click

end sub

You can read more about this at
http://support.microsoft.com/kb/245407/en-us

Note: You can also effect Exports by modifying the key
HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\4.0\Engines\Text\DisabledExtensions

Why not try one of the articles at our website

Add a Global Error Handler To Your Page
Replace Your File API’s With The FileDialog Object

Click on the Next Tip button for the next page in this Access Loop.

 

Links >>>  Home | Search | Workbench | Orders | Newsletter | Access Security | Access professionals