Results 1 to 12 of 12
  1. #1
    RonnyV is offline Novice
    Windows 11 Access 2016
    Join Date
    Mar 2023
    Posts
    7

    Access Error - Data disconnect or something else?

    Hi all,



    So let me set this scene. I have an Access 2016 front end that is using Sharepoint lists as the back-end. I have multiple users that all have a local version of the front-end client. One of my users is having a weird error that I have never seen. I cannot re-create it on my client, no other users are having the same issue, and even with a fresh client it happens consistently to this particular user.

    What happens is. On the form they are using. She is using one of the options I have built to filter the data, and when she filters or searches the data, it shoots an error that it cannot go to the specified record and the data seems to disconnect from the front end. Even following all the same steps I cannot re-create this error on my client or others. All the data windows on her client switch from the data to ?NAME?? and the error highlights this part of the code as errored.
    With Me
    .currentid = Nz(.ID, 0)

    End With

    Like I said, this only happens with this particular user and no one else of the 15 or so people using the database. It only happens when she uses the filter options that seem to disconnect the front end from the back end for no reason.

    Right now I am not sure how to fix this issue.

    Anyone have any clues as to what it might be?

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,914
    Assuming CurrentID is an autonumber?, how can you go to a zero autonumber?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    RonnyV is offline Novice
    Windows 11 Access 2016
    Join Date
    Mar 2023
    Posts
    7
    Quote Originally Posted by Welshgasman View Post
    Assuming CurrentID is an autonumber?, how can you go to a zero autonumber?
    Its not an autonumber it just takes the form back to the first record. Its a common code for when a refresh is done.

    While this code is showing as the error in VB when she encounters the problem, its only her that has the issue. The code is the same for everyone but I literally cannot re-create this on any other client.

    What looks like is happening is that when the form refreshes with the new filter that it loses data connection and cannot go to the first record. I am only saying this because when it happens all the fields on the form go errored out with words like ???NAME??? like it cannot find the field that is supposed to be connected to that field on the form.

    So far the only thing I can come up with is that it may be caused by her computer some-how. Like would bugged RAM cause an issue like this if, when the form refreshed, it maxed out?

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    I presume the code stops on the .currentid = Nz(.ID, 0) line, and not the With Me line
    Since nobody else is having a problem it is likely to be a problem with the data they are trying to reference. Perhaps you are prefiltering on the user ID or similar so each user only sees 'their' records.

    what is currentID? an unbound textbox? a bound one?

    What is the datatype for ID? numbers? text?

    what values do you see for ID when the code stops and you hover over the relevant code

    Have you tried stepping through the code - put a break point at the start of the code (when the user clicks a button, whatever that initiates this code? step through and check values as you go and/or use the locals window

    My best guess is that ID is text (or interpreted as such) and has been populated with a zls, in which case the nz function won't work

    or it is null and as WGM suggests, you don't have an ID of 0

  5. #5
    RonnyV is offline Novice
    Windows 11 Access 2016
    Join Date
    Mar 2023
    Posts
    7
    Quote Originally Posted by CJ_London View Post
    I presume the code stops on the .currentid = Nz(.ID, 0) line, and not the With Me line
    Since nobody else is having a problem it is likely to be a problem with the data they are trying to reference. Perhaps you are prefiltering on the user ID or similar so each user only sees 'their' records.

    what is currentID? an unbound textbox? a bound one?

    What is the datatype for ID? numbers? text?

    what values do you see for ID when the code stops and you hover over the relevant code

    Have you tried stepping through the code - put a break point at the start of the code (when the user clicks a button, whatever that initiates this code? step through and check values as you go and/or use the locals window

    My best guess is that ID is text (or interpreted as such) and has been populated with a zls, in which case the nz function won't work

    or it is null and as WGM suggests, you don't have an ID of 0
    Thanks for the heads up. I will definitely step through it next time when she encounters this error.

    Current ID is unbound and ID is bound to the ID for the record. The form has filters for the form in the header, the data displayed in rows in the data, and a detail section for the selected record in the footer. The particular code tells the footer what record to display the data for in the footer. The form is designed for the user to be able to step through applicants to job positions, look at qualifications and details, and change their status in the hiring process.

    What's weird how the client only does it on occasion and then it is working as intended again. I cannot seem to replicate the error on mine or another's client. When I attempt to it is all working as intended. Only this particular employee has this issue.

    Honestly it feels like some type of issue that's happening during the filter refresh as if the data is getting hung up and not loading (like a data connection error during refresh) and that is causing the lack of ID to error out.

    I personally am leaning toward a potential hardware issue with the users laptop maybe faulty RAM as it only happens to her and sporadically. But I will link up with her and step through the code the next time we are online at the same time.

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,914
    One easy way to test that, is for her to login using a computer that you know works?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  7. #7
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    Your user isn't by any chance connecting wirelessly? - that could explain a 'data outage' as wireless is not that stable.

  8. #8
    RonnyV is offline Novice
    Windows 11 Access 2016
    Join Date
    Mar 2023
    Posts
    7
    Quote Originally Posted by CJ_London View Post
    Your user isn't by any chance connecting wirelessly? - that could explain a 'data outage' as wireless is not that stable.

    She does sometimes, and other times she is in the office plugged into the network directly. I work fully remote with a satelite connection and cannot re-create it on my own system.

  9. #9
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    I would check whether she is connected wirelessly when these errors happen. I would also check the other users as well. Point is you are trying to determine what is different about this particular user.

    It is easily done - I've taken my laptop to a meeting, forgetting I'm now connected wirelessly and the connection drops or fluctuates causing an error.

    What matters is the connection between the device and the router, so unless you are wireless as well, I don't think the satellite part of the total connection is necessarily relevant. And if your are connecting wirelessly, just remember it is a different connection from your user. Perhaps more stable.

    Other thing to verify is does this happen with other parts of the app or just this one particular form and event.

  10. #10
    RonnyV is offline Novice
    Windows 11 Access 2016
    Join Date
    Mar 2023
    Posts
    7
    Quote Originally Posted by Welshgasman View Post
    One easy way to test that, is for her to login using a computer that you know works?
    Thats an interesting suggestion I will have her try that.

  11. #11
    RonnyV is offline Novice
    Windows 11 Access 2016
    Join Date
    Mar 2023
    Posts
    7
    Quote Originally Posted by CJ_London View Post
    I would check whether she is connected wirelessly when these errors happen. I would also check the other users as well. Point is you are trying to determine what is different about this particular user.

    It is easily done - I've taken my laptop to a meeting, forgetting I'm now connected wirelessly and the connection drops or fluctuates causing an error.

    What matters is the connection between the device and the router, so unless you are wireless as well, I don't think the satellite part of the total connection is necessarily relevant. And if your are connecting wirelessly, just remember it is a different connection from your user. Perhaps more stable.

    Other thing to verify is does this happen with other parts of the app or just this one particular form and event.
    Yeah that is a good point. Thanks! I will definitely check on that. My understanding is that much like me, the other users also use it both wirelessly and connected when they are at the office and or home.

  12. #12
    RonnyV is offline Novice
    Windows 11 Access 2016
    Join Date
    Mar 2023
    Posts
    7
    Just an update to everyone here. Our IT folks that support my user took a look at her laptop and apparently there were some issues effecting her processor speed and memory. They made some adjustments to the laptop and all seems to be working as intended now.

    Fingers crossed it stays that way.

    Thanks for all your replies!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 02-15-2018, 03:11 AM
  2. Replies: 0
    Last Post: 03-18-2017, 03:40 AM
  3. Code to disconnect users while update is running
    By Glenn_Suggs in forum Programming
    Replies: 2
    Last Post: 04-15-2014, 06:39 AM
  4. Data mismatch error in Access report
    By ragpatil in forum Reports
    Replies: 9
    Last Post: 09-10-2012, 07:54 AM
  5. Replies: 2
    Last Post: 08-10-2012, 12:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums