Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Delta, Br. Columbia
    Posts
    116
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Data has Changed (2000/XP)

    Very strange. I have made a change to one of the possible underlying queries to a subform and now whenever data is changed a MS Access msg box comes up saying "Data has changed". Clicking OK does nothing except acknowledge the message. Nothing I do (including SetWarnings) seems to be able to stop it. The subform(datasheet view) has 4 possible queries that act as the source depending upon data selections made in the main form. This is because the sort sequences can change as well as other data. The msgbox appears regardless of the underlying query and 2 of them have not changed. None of the other forms/subforms in the database have this message appear even if data is changed. Does anyone have any ideas how to stop the message?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Data has Changed (2000/XP)

    Do you change the record source for the subform in code? If so, you should save the record in the subform before doing so.

    Do you have code that modifies the data in the subform? If so, this might conflict with changes the user enters.

    Do the data in the subform reside in an SQL Server database? There are situations in which the error message you mention occurs for SQL Server data.

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Data has Changed (2000/XP)

    Exactly when do you get that message? That is, is it when you change data on the Mainform, on the subform, or both?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Delta, Br. Columbia
    Posts
    116
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Data has Changed (2000/XP)

    OK sorry about this but I have done some more research and the message has no bearing on the change I made. To respond more directly to both your questions and hopefully clarify when it occurs:

    1) It is not an SQL backend. It is an Access backend.

    2) The source change occurs in a previous form. the actual main/sub form that does the editing and generates the message has no change in source. There is a difference between the source for the main and the sub forms but to the best of my knowledge and experience that should not be a problem.

    3) The message appears after I have changed data in the sub form (it uses a tab control and it does not matter what the data changed is) and then click the exit form button to close the form and return to the preceding form. It seems to occur immediately the event starts. If I step through the code in break mode it does not seem to appear (there is no beep to say that the msgbox has appeared) and the form closes successfully.

    The code executed on click is as follows:

    Private Sub CloseForm_Click()
    On Error GoTo Err_CloseForm_Click

    'UnLock Datasheet if locked
    If Me.AllowEdits = True Then
    Me.DSLocked = False
    End If

    'Refresh Datahseets list if coming from that screen
    If Me.OpenArgs = "List" Then
    Forms!frmDatasheets_List!frmDatasheets_List_Subfor m.Requery
    End If

    DoCmd.Close

    Exit_CloseForm_Click:
    Exit Sub

    Err_CloseForm_Click:
    MsgBox Err.Description
    Resume Exit_CloseForm_Click

    End Sub

    What is also very strange is that if I allow the Close Button to be available and then use that, the form closes with no message (that is why I am showing you my code.

    3) The Close Button does modify code but there is no conflict with the user as they cannot edit that field. The DSLocked field is used to control access to associated tables and ensure that other users cannot modify anything on the same job at the same time. Built in record locking does not go far enough for what we want to do. In my testing ghere are no other users logged into the databases.

    4) The main form displays data from associated (to the datasheet table) tables (customer name, address, project manager etc.) and none of it is modifiable by the user. The subform tab control shows data from a query using the datasheet table amd one other refernce table and that is the one that is reacting. There is also another subordinate table on one of the tabctls(datasheet antennas) and if data is changed on that sub form the message does not appear.

    5) The subform source is a query using 2 linked tables (one only provides reference data as mentioned above). the subform on the subform (antennas) is based directly on the table.

  5. #5
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Data has Changed (2000/XP)

    Let me be sure I understand the scenario. You have a form/subform from which you are opening another form to do editing on some record that is displayed either on the main or subform (I couldn't figure out which). Then you get this error after closing the 2nd form. Is this correct?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  6. #6
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Delta, Br. Columbia
    Posts
    116
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Data has Changed (2000/XP)

    Sorry for being so obtuse but in general yes you are correct.

    The first main/sub form presents a list of records that the user can filter to restrict what they are looking at. Then the user can select one of the displays records and click on a button to open another main/subform that allows them to edit the record. This is the form that is generating the message.

    Just to confuse the issue, the user can edit a record from another pathway. The basic set of relationships are that 1 job can have many details and 1 job can have many datasheets. The user can access a datasheet either from a list of datasheets (as described in para 1) or directly from the associated job. In both cases the datasheet edit generates the Data Changed message. There have been no changes to this form since the last install at the client and the message is not appearing on the client's version.

    Note I am running a fully patched version of Office XP; they are running Office 2000 with the latest version of the Jet engine.

    To repeat what is happening:

    When exiting the Edit form/subform by clicking a programmed Exit button, the message "Data has changed" appears. Clicking the OK button in this message box leaves the user still in the Edit form and clicking the Exit button again, finally closes the form.

    Hope that is clearer

  7. #7
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Data has Changed (2000/XP)

    Yeah, that is clearer. Are you getting that message that someone else has changed the record while you were working on it, warning you that you will overwrite these changes? Or are you just getting an informational message? Cause I'm not sure I've ever seen such a message myself. Are any changes being made in the mainform/subform prior to calling the 2nd form? Perhaps you could check if the form is dirty prior to calling that form and save the record (just in case).
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  8. #8
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Delta, Br. Columbia
    Posts
    116
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Data has Changed (2000/XP)

    No the message is just informational. I was hoping to send you a test version but I cannot reduce the zip file below 112kb. In this test version I have no calling forms - just the modify form and subform and the message keeps coming up. There are no changes being made to the actual forms (except formatting but I am not touching that part of the form.)

    I don't think it will help much but I am attaching a picture of the msgbox for your info.
    Attached Images Attached Images

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Data has Changed (2000/XP)

    See if converting the database to Access 97 format (Tools | Database Utilities | Convert Database | ...) and zipping the 97 version gets it below 100 KB.

  10. #10
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Data has Changed (2000/XP)

    I don't think I've ever seen that message before!
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  11. #11
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Delta, Br. Columbia
    Posts
    116
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Data has Changed (2000/XP)

    OK here is a 97 version of the database and the error still occurs but now the message is a bit more explicit in that it says that another user has changed the data and it needs to be saved. The only thing is there is no other user logged on.
    Attached Files Attached Files

  12. #12
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Data has Changed (2000/XP)

    Well, I got your database, but I've got no idea what to do with it! What do I have to do to create this error?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  13. #13
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Delta, Br. Columbia
    Posts
    116
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Data has Changed (2000/XP)

    Sorry about that. I wrote the post several times before actually posting to see if I could shed any more light on the problem and the last time forgot the instructions. Anyway open the form frmDatasheets_Mod_Hdr and then make any change you like to the data in the subform/tabctl and click on the Close Datasheet Form button. The error occurs then. The only time it does not occur is if you change data on the Antenna & Tx Lines tab. This contains another subform and for some reason it works OK.

    You can type any data you like in the fields unless it is a combo box.

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Data has Changed (2000/XP)

    The problem is that the record source of the main form and the subform overlap: both contain tabDatasheets and tabSites. The record source of a main form and subform should always be distinct. Moreover, the code for the On Close event of frmDatasheets_Mod_Hdr modifies DSLocked, a field that occurs in the record source of the subform. This causes a conflict: the user has just modified a record in the subform, and now the main form tries to modify the same record.

    You should:
    - Remove tabDatasheets and tabSites from qryDatasheets_mod.
    - Link frmDatasheets_Mod_Hdr and frmDatasheets_Mod_Subform on JobID only.
    - Remove SiteID, SiteName, RevisionNumber and DSLocked from frmDatasheets_Mod_Hdr.
    - Remove the reference to DSLocked in the code behind the On Close event of frmDatasheets_Mod_Hdr.

  15. #15
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Data has Changed (2000/XP)

    As Hans pointed out, you have a table [tabDatasheets] in the RecordSource for both the mainform and the subform. When Access says "another user has made changes", it really means "another Process has made changes", and that other process could be something you initiated or someone else initiated. In this case, the other process is the subform. I see no particular reason why you need [tabDatasheets] in the query behind the mainform. Try removing it.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •