469,595 Members | 2,296 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,595 developers. It's quick & easy.

Error accessing file?

GCM
I have a database which was created from another parent database by
combining some fields into one field for clerification purposes. When I
create a for with the following command I get this error:

Error accessing file. Network connection may have been lost.

Following is the function I use. Eveything else works fine. This function
worked on the parent database. The form data is linked to the proper table:

-------------------------------------------------
Private Sub Search_Click()
On Error GoTo Err_Search_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

Exit_Search_Click:
Exit Sub

Err_Search_Click:
MsgBox Err.Description
Resume Exit_Search_Click

End Sub
--------------------------------------------------

Thanks in advance...
gcm
Aug 17 '06 #1
2 1908
First, take off this line:
Screen.PreviousControl.SetFocus

Then, do a repair/compact on the database and try it again. If it
works, try adding that line back into the sub.

GCM wrote:
I have a database which was created from another parent database by
combining some fields into one field for clerification purposes. When I
create a for with the following command I get this error:

Error accessing file. Network connection may have been lost.

Following is the function I use. Eveything else works fine. This function
worked on the parent database. The form data is linked to the proper table:

-------------------------------------------------
Private Sub Search_Click()
On Error GoTo Err_Search_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

Exit_Search_Click:
Exit Sub

Err_Search_Click:
MsgBox Err.Description
Resume Exit_Search_Click

End Sub
--------------------------------------------------

Thanks in advance...
gcm
Aug 17 '06 #2
GCM
ManningFan,

Thanks for the suggestion, but that didnt work either. When I deleted the
line from the command, nothing would work. Icouldn't save the form or
compact the database. I appreciate your efforts very much.

Thanks,
gcm

"ManningFan" <ma********@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
First, take off this line:
Screen.PreviousControl.SetFocus

Then, do a repair/compact on the database and try it again. If it
works, try adding that line back into the sub.

GCM wrote:
>I have a database which was created from another parent database by
combining some fields into one field for clerification purposes. When I
create a for with the following command I get this error:

Error accessing file. Network connection may have been lost.

Following is the function I use. Eveything else works fine. This function
worked on the parent database. The form data is linked to the proper
table:

-------------------------------------------------
Private Sub Search_Click()
On Error GoTo Err_Search_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

Exit_Search_Click:
Exit Sub

Err_Search_Click:
MsgBox Err.Description
Resume Exit_Search_Click

End Sub
--------------------------------------------------

Thanks in advance...
gcm

Aug 19 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by jim | last post: by
1 post views Thread by sk | last post: by
13 posts views Thread by JebBushell | last post: by
2 posts views Thread by Terry Holland | last post: by
2 posts views Thread by le0 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.