*.laccdb file stuck

I am trying to update the back-end of my database by importing new data into a table...but I keep getting an error message that says Access can't overwrite the table. So, I checked the front-end to see who was in the database, and sent out an email for everyone to log out. I waited and waited, then went to each workstation to verify that the five people still on the list logged out. When I got back, I checked the *.laccdb, and it said the same five users were still in the database.

So, I went into the database, reopened the *.laccdb to verify that I was now on the list (I was) then I logged out and rechecked the file...but it still said I was in the database.

I rebooted, no luck.

Any suggestions?

Thank you,
Jess


Post your answer or comment

comments powered by Disqus
I am attempting to backup the backend from the frontend. The backend is shared, so I am checking whether .laccdb file exists. I tried to do that by running the check code from an auxilliary form.

The idea is to run some code when the db is being closed. My main form is bound to the backend. I have tried all the tricks I could think of, but no matter what I do the .lcddb is still there. I have been playing with a hidden form, and a form that is opened from the main form's OnClose, OnActivate ... no matter what permutations I use he .lccdb is still around. The reason is obviously the one-threadedness of Access - the main form isn't closed before all the code on the auxilliary form has run.

I can push a button and get my backup done just fine (.laccdb is gone), but I want to just show the result (success/failure) without user interaction.

Some inspiration would be appreciated.

Hi - I have a linked database and occasionaly the ".laccdb" file is still being displayed after a weekend and I know no one has been into the system for several days. Why would this lock file still be displayed? I can delete it without a problem. I tested this scenario when I've had the database open and the O/S won't allow me to delete the laccdb file.

Do I need to be concerned about this file hanging around when no one has been in the database? I don't recall this problem with previous versions of Access and I've been out of the development mode for a few years.

Thanks in advance for suggestions on how to prevent this file from hanging around.

Please help.

I am fairly new to Access so treat me like a noob

I have created an access 2007 database (not front/back end yet). Set it up on my pc and everything was fine.

When i transferred it to my server PC (network) and opened the database it correctly created a .laccdb file.

My problem is, when i close the database this file does not delete.

I am unable to make changes under the "admin" logon as the file is locked by "Admin" ???

I have a front end that is opened virtually 24/7. One of the forms in the front end links into a table of another backend (let's call this Backend B). I've made sure the underlining queries is "Snapshot" and also made sure the form does not allow data entry or any editing. I've also made sure the database does not have any record locking enabled and the client opens in "shared" mode.

I am having problems with Backend B always being "locked" - there is a .laccdb file present and I cannot delete it.

I presume this is because I have the form that links into Backend B is opened 24/7. I would've thought setting the recordset type as "snapshot" would prevent this? Is there anyway I can redesign this form so it doesn't locked up Backend B 24/7 too?

Thank you!

When I open my LACCDB file in Notepad to see who is in it, it says I'm in it...3 times and yet I don't have access open. How do I get rid of this without rebooting my computer?

I was wondering if I can somehow set up a multi-user/Split-App to timeout if it isn't being used for say 30 minutes by anyone?

My issue is that folks get into the system then don't close it, this keeps the .laccdb file open. Preventing me from doing a number of things, but mainly pulling the file off line. I can ask the network folks to kill the .laccdb file, but that isn't practicle, being they cannot get to this task in a timely fashion.

When I look up timeouts (or session timeouts) in conjunction with MS Access, all I seem to get is ODBC query connection timeout information, or outlook web timeouts.


Does anyone here have any idea how I might go about setting Access session timeouts? OIr even if it can be done?

Thanks,
Gary

Hi,

I have code that I have used for years to backup/repair my be database. It works great, but first checks to be sure the bename.laccdb file does not exist to confirm no one is in the database.

I am just starting to use ribbons and I want to execute this code from the ribbon. The code works great, but I just added to to check if any forms are loaded and if so close them. This is where my problem lies.

First I tried in my backup code (function):

if fisloaded("frmAuthList") docmd.close acform,"frmAuthList"

Then I tried the same function in a macro

Both methods close the form, but it's as if the connection to the be still exists because the bename.laccdb is still there.

Now if I manually click the close button on the open forms and then try the backup/repair function, the bename.laccdb is gone and it works fine.

Anyone know why this doesn't happen when I close the forms in code?

Hello,

I have Access/Excel 2007 and am using excel macros with ADO to create an .accdb file and loading a table from excel. I am then running my queries via the macro. I'm not real fluent with this process and the problem that I am running into is that when the .accdb file is created the associated .laccdb file is create...but when I close out of everything, the .laccdb file stays and I can't remove it without actually re-opening the .accdb file and closing.

Is there a line of code that I am missing that is not closing the file/removing the .laccdb?

Hello All

This is my first post on this forum.
I have found some very useful information here to complete this task, but being a noob to VBA, can't put the pieces together.
(Sorry for the wording, English is only my third language.)

Your help is much appreciated.

_What I would like to do_

Based on values of a form create a directory and copy renamed files there, then open a folder and open a file.

*form*
value1
value2
value3

*create directory*
x:directoriesvalue1value2value3

If it exists, stop and give error message.

*create subdirectories*
x:directoriesvalue1value2value3dir1
x:directoriesvalue1value2value3dir2

*copy files*
x:file_locationfilename1.ext to x:directoriesvalue1value2value3renamed_filena me1.ext
x:file_locationfilename2.ext to x:directoriesvalue1value2value3renamed_filena me2.ext

*open folder*
x:directoriesvalue1value2value3

*open_file*
x:directoriesvalue1value2value3renamed_filena me1.ext


_What I have so far_

-for creating the directory value1:
Private Sub Command337_Click()
strPath = "X:directories" & "" & value1
If Len(Dir(strPath, vbDirectory)) = 0 Then
MkDir strPath
End If
-Need help with the error message.

-for creating the directory value2:
Private Sub Command337_Click()
strPath = "X:directories" & "" & value1 & value2
If Len(Dir(strPath, vbDirectory)) = 0 Then
MkDir strPath
End If
-Need help with the error message.

-for creating the directory value3:
Private Sub Command337_Click()
strPath = "X:directories" & "" & value1 & value2 & value3
If Len(Dir(strPath, vbDirectory)) = 0 Then
MkDir strPath
End If
-Need help with the error message.

FileCopy "x:file_locationfilename1.ext" ????
-Stuck here

-open folder
Shell "explorer.exe " & strPath, vbNormalFocus

-open file
-Stuck here


Thank you

Hi, this is the first question I've posted. If I'm not using the right forum, please let me know.

I've created a For Each loop in the before update event of a subform to check whether any text box in the detail section contains data. If at least one text box is not null or empty, the record is saved.

After I've used the database, triggered this event, closed the form, and closed the database, the .laccdb file remains. When I try to reopen the database, I get an error message saying it's locked. I have to then go into Task Manager, end the MSACCESS.EXE process, and delete the .laccdb file before I can open my database again.

This isn't a split database. It's on my computer and I'm the only user.

I'm posting my code below. This problem only started after I created and ran the code. If someone could look at this and tell me how this code is causing this problem and what to do about it, I'd be grateful. Thanks!


	Code:
	Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.NewRecord Then 'Test if this is a new record.
  
  Dim ctl As Control
  Dim i As Integer
  i = 0
    For Each ctl In Me.Section(0).Controls 'Loop through the controls in the detail section.
  
        If ctl.ControlType = 109 Then 'Test each to see if it's a text box
            If IsNull(ctl) = False Or Len(ctl) > 0 Then 
                Exit For 'bail out of the loop and continue with the record update.
            End If
        End If
        i = i + 1 
    Next 
    
    If i = Me.Section(0).Controls.Count Then
        Me.Undo 
    End If
End If
End Sub



Is there anyway to force anyone in an access database out? We have a locked access 2007 DB that I have visually confirmed no one is in, but the lock remains. Is there any way to clear it?

Thanks

In the laccdb file the computer users do not clear out when they close the database. So how do I easily get a list of computernames or usernames of users that are actively using the database?

Hi all,

I am having a very frustrating problem that is now more noticable as my users increases. I am running MS Access 2010 with all my backends split into FE/BE format.

The BE is stored on a network shared drive where all users (should) have full rights. The FE is saved locally on each users desktop. The clients settings are all set to ensure no record locking and the database opens in shared mode. I use queries as recordsource and avoid dlookups where possible. None of my forms have record level locking (all set to No locks)

The problem I have now is that once any client opens any table in the BE the whole BE is locked (laccdb file created). This poses a problem when I run my nightly compact and repair script or when I need to make changes to a table in the BE.

I do not understand why it is locked (no exclusive rights to edit) in this way. I am pretty sure I never had this problem before but maybe back then I do not have so many concurrent users. I also have some hidden forms for maintenance purposes that runs periodical checks with the network BE file... Now some users encounter "this table is locked..." error.

Even opening a form in design mode on the FE seem to create a laccdb file on the BE! It seems to create the lacddb file if any of my forms have a recordsource set as "Dynaset" or "Dynaset - Inconsistent updates"

This thread best describes my problems : http://bytes.com/topic/access/answer...tabase-lock-up

I am trying to find out from our IT dept. if our shared drive is a UNIX system (this is the only other possible cause I can see now)

I am just hoping if anyone else here could offer more insight...

I have a problem with a .laccdb file being aytomatically created when the PC starts up.

If I split the database FE & BE does access still create a .laccdb ?
If so is this on the Backend?

Thank You

I’m having a problem where I open a couple of forms in my database and then I am no longer able to edit the forms (in design mode) – I get the message “You do not have exclusive access to the database at this time…”

I’m running the database on my local drive. There are no networked tables involved.

I’ve noticed that when I open the first bound form, the laccdb file appears and the contents shows my user ID which is what I would expect being the user. However, when I open a second bound form (any bound form), the laccdb then shows my user ID twice. I think this might be the problem but I don’t know what’s causing it.

The laccdb actually shows:


	Code:
	USERID123              Admin            USERID123          admin

Is there any significance of the upper/lower case of admin?


Setup is Access 2007 on Windows XP.

Chris

I have an Access 2007 application installed on a network with 12 users. Each user has their own copy of the front end (FE) database .accdb file. The backend (BE) database .accdb file is on a drive mapped to a shared folder on the server.

The FE database contains links to tables in the BE database. Forms in the FE are bound to tables in the BE. Users typically open the FE application main form, which is not bound to a table, at the start of the day and leave it open all day. The application window is minimized when not in use.

Users were experiencing delays when first using the application after it was minimized for a while. I suspected that the table links to the server were timing out while the application was minimized and the connection to the server had to be reestablished. So, I bound the main form to a linked table to keep the server connection up. This worked - no more delays.

Now, users are getting "Can not save; locked by another user" error boxes popping up randomly throughout the day - even when the FE application is minimized and not actively using the BE data tables.

I have error handling in all the FE forms and no form error handler is being hit when these error boxes pop up. So, my theory is that the error message is not referring to a data table in the BE but rather to the BE .laccdb file which is periodically being updated by the 12 users keeping the BE database connections open. And, occasionally 2 users try to update the .laccdb file at the same time.

Am I correct that the locking error message refers to the BE .laccdb file? If yes, how can I stop the locking error messages from popping up on the users screens?

Or, is there a better way to solve my first problem of delays after the application has been idle for a while?

I run a job that puts data in an external temp accdb, then I open a form in VBA and set the SourceObject to a query that hits that temp accdb. When I close the form, I set the SourceObject = "", but the laccdb file doesn't go away. If I try to run the job again, it bombs - the temp accdb is already there.

In order to make the lock file go away, I have to completely shut down Access. I have traced the activity of the query and form, but can't find why it is getting hung up.

Does anyone have any idea where this should be getting released?

Thanks,
T

I am trying to open a user chosen excel file from an access 2007 program. The code will open a excel file perform some data manipulation then save and close the excel program. At this time I am stuck with how to open the excel file. The following code does not open excel it just crashes then I get a runtime error Automation error The remote procedure call failed.

Function Pbuseconversion()
Dim f As Object
Dim myfile As String
Dim objXLApp As Object
Dim objXLBook As Object
Set appExcel = Nothing
Set f = Nothing
myfile = ""

Set f = Application.FileDialog(3)
f.Title = "Select FMS Data file."
f.filters.Add "xls", "*.xls"
f.AllowMultiSelect = False
f.Show
With f
myfile = .SelectedItems(1)
End With
Set objXLApp = CreateObject("Excel.Application")
Set objXLBook = objXLApp.Workbooks.Open(myfile)
objXLApp.Application.Visible = True
Set appExcel = Nothing
Set f = Nothing
myfile = ""

End Function


please help, thx

Hello there!

I've searched the forum for help on this but can't seem to find what I need. I know I can run batch files from Access but I seem to be hitting a brick wall. Maybe it's because I a bit fick or maybe because it's Friday but I'm just completely stuck.

I have the basic syntax down OK and can get the calculator to execute using this example.

Sub Test()
Dim RetVal
RetVal = Shell("C:WINNTSYSTEM32calc.exe", 1)
End Sub

Moving ahead from there I can get X:DIRECTORYSUBDIRECTORYPKZIP.EXE to run also. But when I try to run a batch file with the command PKZIP -A OTTAWA Ot*.snp inside it bums out, or even if I just call a batch file with PKZIP.EXE as it's only command (just as a test) it changes the format of the sub-directory and I end up with this in the DOS window:

X:DIRECTORYSUBDIRECTORY> (note the addition of the greater than sign) and "PKZIP.EXE is not recognised as an internal or external command, operable program or batch file".

I am obviously screwing up on syntax somewhere but the Access "help" file isn't really helping at all and I don't know where else to turn. Can someone help me figure out what it is that I am missing - or am I just totally off base on what I can do with this Shell command thingie.

Comments appreciated. Thanks in advance and apologies if I am covering old ground.

Good day, Sorry but my english is not good. :oI do see is first a question, I'm stuck with a failure to conduct this program. I have three files that I am enclosing, Ejem.txt and Ejem2.txt values of 7 months from January to August with their respective headers and other files EjLatLong.txt this data is latitude and longitude. What I do is create an Access database with 2 tables (MesesE1, MesesE2) corresponding to a data Ejem.txt and the other values should Ejem2.txt both fields: ID, Lat, Long, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug. The latitude and longitude data must be removed from the file EjLatLong to fill in these fields.
The files are in your head that are 38 * 16 grid this means choosing the latitude and longitude must look at this file because the latitude and longitude is given by 16 lat and long 38, brother-in-law went to the table to fill these areas must be considered that for the first 38 months of data will be the first value in latitude and longitude will change for each of the 38 data for the following latitude 38 recently changed to its second value and so every 38 . I have to do this, programming in visual access, will have any idea how to do it.
Has been understood and I hope I can help:confused:.
Many thanks for the time:)

Good day,

I hoping someone can help me here, I have a large number of text files that are produced each day, which sit on a specific drive under their own folders. I have another drive where by the exact same folder names have been created.

I currently have some code written that copies the text files from one location to the other, but I'm sure there must be a much more efficient way of writing code i.e. using a looping method, but I can't seem to get my head around it.

here is a sample of what I have currently:

===========
BEGIN CODE
===========

DoCmd.Echo False, "Running Program"
DoCmd.Hourglass True
DoCmd.SetWarnings False

Dim FS As FileSystemObject 'Declare the File System Object
Dim Folder As Folder 'Declare the folder object
Dim SubFolder As Folder 'Declare the sub folder object
Dim File As File 'Declare the File object
Dim SortDate 'Declare the SortDate variable
Dim SortBatch 'Declare the SortBatch variable
Dim dtmDate As Date ' Declares the date variable
Dim dtmFileDate As Date 'Declare the dtmFileDate variable
Dim TextFileDate 'Declare the TextFileDate variable

'Sets the FS variable to the CreateObject
Set FS = CreateObject("Scripting.FileSystemObject")

'Assigns the system date to the dtmDate variable
dtmDate = Date

'This program copies text files from the prodreg on prdfs01'(B Drive [eFLOW] to the
'Ocrff_Test on Leint03'(T Drive

'AEG
'Copy the aeg.txt file from the aeg.fof folder on the B Drive to the BackupProdRegOnprdfs01aeg.fof folders add the current date
'at the end of the text file name.
FS.CopyFile "B:aeg.fofaeg.txt", "T:BackupProdRegOnprdfs01aeg.fofaeg " & "_" & Format(Date, "ddmmyy") & ".txt"
FS.CopyFile "B:aegaex.fofaegaex.txt", "T:BackupProdRegOnprdfs01aegaex.fofaegaex " & "_" & Format(Date, "ddmmyy") & ".txt"

'AGA - Part 3 Phase 3 eFLOW
FS.CopyFile "B:aga.fofaga.txt", "T:BackupProdRegOnprdfs01aga.fofaga " & "_" & Format(Date, "ddmmyy") & ".txt"

'ARISTON
FS.CopyFile "B:arib1y.fofarib1y.txt", "T:BackupProdRegOnprdfs01arib1y.fofaris1yr " & "_" & Format(Date, "ddmmyy") & ".txt"
FS.CopyFile "B:arib2y.fofarib2y.txt", "T:BackupProdRegOnprdfs01arib2y.fofaris2yrs " & "_" & Format(Date, "ddmmyy") & ".txt"
FS.CopyFile "B:arist.fofarist.txt", "T:BackupProdRegOnprdfs01arist.fofariston " & "_" & Format(Date, "ddmmyy") & ".txt"
FS.CopyFile "B:ariylk.fofariylk.txt", "T:BackupProdRegOnprdfs01ariylk.fofariylk " & "_" & Format(Date, "ddmmyy") & ".txt"

'BAXI/HEATEAM/MAIN/POTTERTON/VALOR/WONDERFIRE
FS.CopyFile "B:ba2def.fofbvw2dp.txt", "T:BackupProdRegOnprdfs01ba2def.fofbvw2dp " & "_" & Format(Date, "ddmmyy") & ".txt"
FS.CopyFile "B:baxbxt.fofbaxbxt.txt", "T:BackupProdRegOnprdfs01baxbxt.fofbaxbxt " & "_" & Format(Date, "ddmmyy") & ".txt"
FS.CopyFile "B:baxitb.fofbaxitb.txt", "T:BackupProdRegOnprdfs01baxitb.fofbaxitb " & "_" & Format(Date, "ddmmyy") & ".txt"
FS.CopyFile "B:vbw5yr.fofvbw5yr.txt", "T:BackupProdRegOnprdfs01bvw5yr.fofbvw5yr " & "_" & Format(Date, "ddmmyy") & ".txt"
FS.CopyFile "B:heatbl.fofheatbl.txt", "T:BackupProdRegOnprdfs01heatbl.fofheatbl " & "_" & Format(Date, "ddmmyy") & ".txt"
FS.CopyFile "B:maiitb.fofmaiitb.txt", "T:BackupProdRegOnprdfs01maiitb.fofmaiitb " & "_" & Format(Date, "ddmmyy") & ".txt"
FS.CopyFile "B:potib.fofpotib.txt", "T:BackupProdRegOnprdfs01potib.fofpotib " & "_" & Format(Date, "ddmmyy") & ".txt"
FS.CopyFile "B:pottsm.fofpott2ysm.txt", "T:BackupProdRegOnprdfs01pottsm.fofpott2ysm " & "_" & Format(Date, "ddmmyy") & ".txt"
FS.CopyFile "B:vbw5yr.fofvbw5yr.txt", "T:BackupProdRegOnprdfs01vbw5yr.fofvbw5yr " & "_" & Format(Date, "ddmmyy") & ".txt"

'BEKO
FS.CopyFile "B:beko.fofbekosf.txt", "T:BackupProdRegOnprdfs01beko.fofbekosf " & "_" & Format(Date, "ddmmyy") & ".txt"

'BELLING
FS.CopyFile "B:bellin.fofbelling.txt", "T:BackupProdRegOnprdfs01bellin.fofbelling " & "_" & Format(Date, "ddmmyy") & ".txt"

=========
END CODE
=========

I have this method done for all of my text files and folders.

Below is where I have attempted to rewrite the code hoping to be more efficient, but have got stuck:

==========
BEGIN CODE
==========

DoCmd.Echo False, "Running Program"
DoCmd.Hourglass True
DoCmd.SetWarnings False

Dim FS As FileSystemObject 'Declare the File System Object
Dim Folder As Folder 'Declare the folder object
Dim SubFolder As Folder 'Declare the sub folder object
Dim File As File 'Declare the File object
Dim SortDate 'Declare the SortDate variable
Dim SortBatch 'Declare the SortBatch variable
Dim dtmDate As Date ' Declares the date variable
Dim dtmFileDate As Date 'Declare the dtmFileDate variable
Dim TextFileDate 'Declare the TextFileDate variable
Dim TextFilePath 'Declares the TextFilePath variable

'Sets the FS variable to the CreateObject
Set FS = CreateObject("Scripting.FileSystemObject")
TextFilePath = "prdfs01prodreg"


'This program copies text files from the prodreg on prdfs01'(B Drive [eFLOW] to the
'Ocrff_Test on Leint03'(T Drive

'Open the text file folders
Set Folder = FS.GetFolder(TextFilePath)

For Each File In Folder.Files

If Right(File.Name, 4) = ".txt" Then
FS.CopyFile

===========
END CODE
===========

I'm not sure if this is the correct way. The "prdfs01prodreg" is the location where the text file will be copied from and this is the location in which I want them copies to: Leint03|ocrff_TestBackupProdRegOnprdfs02 under their respective folder names

Any assistance would be greatly appreciated.

John

i need to be able to have an access 97 database import a text file with a click of a button.
the text file is in a tab delimited format and i cant work out how to do this.
sample of the text file below, i only need to get the part where the numbers are and nothing above it in the database. it needs to go into a tabe with set fields and replace the existing data.
anyone give me any info of a vba function to do this i can modify? im stuck on one as there is no Split function in access 97 and cant work out how to place a line into an array to enable me to get the data out individually.

0***: ****** **** ******
******* List


090110 ****, ******** M 8BA 1B:4 08 ***
080211 *******, ****** M 9WA 2:11 09 ***
080248 ****, **** M 9WD 10:8 09 ***
070025 *****, ****** M FLOEL 1:20 09 ***
060175 *****, ****** F SB 16:1 11 ***




i have got so far that reads each line of the text file but cant split each line.

Sub ReadTextFile()

Dim fso As Object
Dim ts As Object
Dim strLine() As String

Set fso = CreateObject("scripting.filesystemobject")
Set ts = fso.opentextfile("c:output.txt", 1)

Do While Not ts.atendofstream

MsgBox ts.readline
'cant work out how to split line up here

Loop

End Sub

Hi Folks,

I'm hoping someone can help me here, as I'm having difficulty in working out how to count records in a text file without having to import the text file into my database.

Here is the code I have so far:


	Code:
	 
DoCmd.Echo False, "Running Program" 'Indicates in the progress bar the program is running
    DoCmd.Hourglass True 'Turn on the Hourglass
    DoCmd.SetWarnings False 'Turn off warnings
    
    Dim FS As FileSystemObject 'Declare the File System Object
    Dim Folder As Folder 'Declare the folder object
    Dim subFolder As Folder 'Declare the sub folder object
    Dim File As File 'Declare the File object
    Dim rst As DAO.Recordset   'Declare rst as DAO Recordset
    Dim DB As Database   'Declare DB as the Database
    
    Set DB = CurrentDb   'Set DB as the current Database
    
    'Sets the FS variable to the CreateObject
    Set FS = CreateObject("Scripting.FileSystemObject")
    'AEG
    'If the aeg.txt file exists in the B:aeg.fof folder then
    If FS.FileExists("B:aeg.fofaeg.txt") = True Then
        Set rst = DB.OpenRecordset("tblFileExists") 'Set rst to Open the tblFileExists table
        rst.AddNew 'Add a new record to the File Exists table
    
        'Add aeg.txt as a record to the tblFileExists table.
        rst!strFileExists = "aeg.txt"
        rst.Update ' write the record to the database
        rst.Close ' Close the recordset.
        Set rst = Nothing  'reset the rst variable to nothing
        DoEvents 'Passes control to the operating system so it can process other events
        'Update the progress bar
        DoCmd.Echo True, "Added AEG Text File: " & "aeg.txt"
    End If

I know that I need to add a field into my table whichwould be strRecordCount which would be place just as follows:


	Code:
	     
    'AEG
    'If the aeg.txt file exists in the B:aeg.fof folder then
    If FS.FileExists("B:aeg.fofaeg.txt") = True Then
        Set rst = DB.OpenRecordset("tblFileExists") 'Set rst to Open the tblFileExists table
        rst.AddNew 'Add a new record to the File Exists table
    
        'Add aeg.txt as a record to the tblFileExists table.
        rst!strFileExists = "aeg.txt"
        rst!strRecordCount = 
        rst.Update ' write the record to the database
        rst.Close ' Close the recordset.
        Set rst = Nothing  'reset the rst variable to nothing
        DoEvents 'Passes control to the operating system so it can process other events
        'Update the progress bar
        DoCmd.Echo True, "Added AEG Text File: " & "aeg.txt"
    End If

It's this part I'm having difficulty with! I'm stuck with what code do I need to write to just get the record count in the text file without having to import the text file. Every line in the text file is a single record, so I guess it's a matter of counting the number of lines in the text file that are not blank lines.

I know I could import the text file count the records in the table and then delete the contents of the table, but as I have a large number of text files I would prefer not to have to import them, but to have the ability to check to see if it exists, if it does count the number of records in it and enter that information into my table in my DB.

Any assistance would be most appreciated.

John

My database has upgraded from Access 2002 to Access 2003. Previously I used msoFileDialogFilePicker to open the Word document associated with the Record on the form. Unfortunately in the upgrade the Microsoft file containing this VB property has got lost. To save purchasing a new file I have rewritten the code that doesn't work. But I am stuck and cannot see a way to call up the Word record from the Access form. How did you go about this before Microsoft introduced the FilePicker Filedialog?


Not finding an answer? Try a Google search.