Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    Unanswered: Write conflict on an ADP

    Hi all I keep getting an error when message its a write conflict message. see I have a form that has two tables in the background and when enter data in it I get a write conflict message saying this record has been changed by another user since you started editing it. I dont know why I'm getting that message. Its an ADP

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    With the information you provide how do you want us to help you?

    Have a nice day!

  3. #3
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789
    this is input form and the Tables behind it. so when the user types in an existing parent id what use to happen is the first name and last name would pop up in their assisgned fields. then they would just type in everything thats located in the tab control which is the Type of contact the, purpose of contact, earned hours..etc. but now when they do that they get a write conflict message. just wonder if the form is set up incorrectly
    Attached Files Attached Files

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Is the textbox where you type the person id linked to the data source? If it is what you are doing is try to modifiy this ID.

    If it's not (and it should not be), how do you perform the search? It should be something like:
    Code:
    Private Sub Text_ParentID_AfterUpdate()
    
        Dim rst As DAO.Recordset
        
        Set rst = Me.RecordsetClone
        rst.FindFirst "ParentID = '" & Me.Text_ParentID.Value & "'"
        If rst.NoMatch = False Then
            Me.BookMark = rst.BookMark
        Else
            MsgBox "Cannot find Id: " & Me.Text_ParentID.Value, vbInformation, "No match"
        End If
        rst.Close
        Set rst = Nothing
        
    End Sub
    Have a nice day!

  5. #5
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789
    see the users perform a search by typing in the ParentId then the name pops up. I have designed a database like this and this is very new to me. So I thougth I would get some clarification on how to do this as an adp. because they like thta feature and they like using the access short cut keys
    Insert the data from the same field in the previous record CTRL+'
    http://office.microsoft.com/en-us/ac...546551033.aspx
    I would normally put a command button there called search so they click on which field they want to search by and vala there ya go. so ths is newto me.

    I turned this databae into an ADP SQL Server 2005 in the back and Access 2007 as the UI

  6. #6
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789
    Quote Originally Posted by Sinndho
    Is the textbox where you type the person id linked to the data source? If it is what you are doing is try to modifiy this ID.

    If it's not (and it should not be), how do you perform the search? It should be something like:
    Code:
    Private Sub Text_ParentID_AfterUpdate()
    
        Dim rst As DAO.Recordset
        
        Set rst = Me.RecordsetClone
        rst.FindFirst "ParentID = '" & Me.Text_ParentID.Value & "'"
        If rst.NoMatch = False Then
            Me.BookMark = rst.BookMark
        Else
            MsgBox "Cannot find Id: " & Me.Text_ParentID.Value, vbInformation, "No match"
        End If
        rst.Close
        Set rst = Nothing
        
    End Sub
    Have a nice day!

    should this code go into the Event of a Text Box in the AfterUpdate??

  7. #7
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Try simply adding in a refresh command in the AfterUpdate Event of your fields or form - ie. Referesh (Note: you may also need to send a refresh command elsewhere - ie. Forms!MyFormName.Refresh
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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