Path/File Access Error

Path/File Access Error

Post by Jennifer Ta » Fri, 05 Jul 2002 15:53:01



Hi all,
    can anyone help me with the following error "Run-Time Error 75"?

    I had checked through each line of codes in my program and managed to
zoom in to a particular section of codes in the
    Lost-Focus procedure for a Text-Box(txtDumE.Text) that cause the error.
I had tried many ways of  resolving the
   error but still not successful.

  The error is as follows,
   Initially, I tried to pass in the AccountID to a textbox(txtAcctID.Text)
that is linked to a datafield('AccountID') and
   datasource (E.g. txtAcctID.Text = datacontrol1.Recordset!AccountID). If I
comment this particular line of codes,
   everything works fine. There's no more error.  I do not know why this
occurs because I had tried using this kind of coding in
   other parts of the application that I'm developing but there's no error.
    (Note: There is no codes under txtAcctID_LostFocus, txtAcctID_Change
etc)

   I'm quite sure is "txtAcctID.Text = datacontrol1.Recordset!AccountID"
that is causing the error because I had tried to
   comment and remove the comment for each line of codes. After knowing that
this is the error, I took away the textbox and
   try other resolutions but are still useless. I still get the "Path/File
Access Error".

  The resolutions that I had tried are:

a) Execute an "UPDATE" Statement.

    Set dbAcctT = OpenDatabase(pathofthedatabase)
   dbAcct.Execute"UPDATE [Table1] SET AccountID = '" + strStoreAcctID + "'
WHERE Key = " & lngKey
   dbAcctT.Close
   Set dbAcctT = Nothing

b) Manually declare and open a recordset

     Set dbAcctT = OpenDatabase(pathofthedatabase)
     Set rsAcctT = dbAcctT.OpenRecordset("SELECT * FROM [Table1] WHERE Key =
" & lngKey, dbOpenDynaset)
     If rsAcctT.EOF = False Then
        rsAcctT.Edit
        rsAcctT!AccountID = strStoreAcctID
        rsAcctT.Update
     End If
     rsAcctT.Close
    dbAcctT.Close
    Set rsAcctT = Nothing
    Set dbAcctT = Nothing

c) Directly use datacontrol to update

    datasource1.Recordset.Edit
    datasource1.AccountID = strStoreAcctID
    datasource1.Recordset.Update

   Thanks for any help given
   Hoon

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002

 
 
 

Path/File Access Error

Post by George Bashor » Fri, 05 Jul 2002 20:29:41


Jennifer

Here are three possible solutions from MS:
Set the access permission on the shared resource to full control.
Use user level access. This is only possible if the computer in question is
part of a Windows NT domain.
Access the file using Win32 API calls.

Make sure your databases are not ReadOnly.

HTH
George


Quote:> Hi all,
>     can anyone help me with the following error "Run-Time Error 75"?

>     I had checked through each line of codes in my program and managed to
> zoom in to a particular section of codes in the
>     Lost-Focus procedure for a Text-Box(txtDumE.Text) that cause the
error.
> I had tried many ways of  resolving the
>    error but still not successful.

>   The error is as follows,
>    Initially, I tried to pass in the AccountID to a

textbox(txtAcctID.Text)
Quote:> that is linked to a datafield('AccountID') and
>    datasource (E.g. txtAcctID.Text = datacontrol1.Recordset!AccountID). If
I
> comment this particular line of codes,
>    everything works fine. There's no more error.  I do not know why this
> occurs because I had tried using this kind of coding in
>    other parts of the application that I'm developing but there's no
error.
>     (Note: There is no codes under txtAcctID_LostFocus, txtAcctID_Change
> etc)

>    I'm quite sure is "txtAcctID.Text = datacontrol1.Recordset!AccountID"
> that is causing the error because I had tried to
>    comment and remove the comment for each line of codes. After knowing
that
> this is the error, I took away the textbox and
>    try other resolutions but are still useless. I still get the "Path/File
> Access Error".

>   The resolutions that I had tried are:

> a) Execute an "UPDATE" Statement.

>     Set dbAcctT = OpenDatabase(pathofthedatabase)
>    dbAcct.Execute"UPDATE [Table1] SET AccountID = '" + strStoreAcctID + "'
> WHERE Key = " & lngKey
>    dbAcctT.Close
>    Set dbAcctT = Nothing

> b) Manually declare and open a recordset

>      Set dbAcctT = OpenDatabase(pathofthedatabase)
>      Set rsAcctT = dbAcctT.OpenRecordset("SELECT * FROM [Table1] WHERE Key
=
> " & lngKey, dbOpenDynaset)
>      If rsAcctT.EOF = False Then
>         rsAcctT.Edit
>         rsAcctT!AccountID = strStoreAcctID
>         rsAcctT.Update
>      End If
>      rsAcctT.Close
>     dbAcctT.Close
>     Set rsAcctT = Nothing
>     Set dbAcctT = Nothing

> c) Directly use datacontrol to update

>     datasource1.Recordset.Edit
>     datasource1.AccountID = strStoreAcctID
>     datasource1.Recordset.Update

>    Thanks for any help given
>    Hoon

> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002