Results 1 to 4 of 4
  1. #1
    krisrider09 is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2016
    Posts
    2

    Popup Form not updating SQL table

    Hi



    I have a problem with one of my clients. They have a cloud network with remote access, and I have a large MS Access DB 2002 with an ODBC connection to an SQL Server 2008 DB.

    The issue I am getting now is some of the popup forms are not letting the User update and edit an existing record. You can add data values to the form but it does not update the record in the table. You can add new records without a problem, but not edit existing records.

    I have checked the permissions on the Server & the SQL DB but it all looks ok.

    Other popup forms in the DB work fine. This error started in one form about a month ago, and now it is two forms at present. I have tried creating new form and copying the controls over to it, but I still get the same error. It happens when you double click on a record in a list-box in the main form and loads the record into a popup form to edit. You can edit the record on the form but it does not update it to the table!

    Any help would be greatly appreciated!
    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    What about the form permission property?

  3. #3
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    What is the On_DoubleClick code in the list box?

    What is the record source for the popup form - table or query?

    Is there any code in the popup form that might be preventing the updates?

  4. #4
    krisrider09 is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2016
    Posts
    2
    Quote Originally Posted by John_G View Post
    What is the On_DoubleClick code in the list box?

    What is the record source for the popup form - table or query?

    Is there any code in the popup form that might be preventing the updates?
    Hi John, thanks for replying to my message.

    What is the On_DoubleClick code in the list box?
    lngID = CLng(Nz(Me.lstHistRdNot.Column(11), 0))
    If lngID > 0 Then
    strFrm = "frmSCPurNAC"
    DoCmd.OpenForm strFrm, acNormal, , , , , CStr(lngID)
    End If


    Form_Open
    'Set Values
    strID = "[OrdID]="
    strNHead = "New " & strItem & " Form"
    strEHead = "Edit " & strItem & " Form"

    'Load User Details
    varID = CVar(Nz(Me.OpenArgs, 0))
    If IsNumeric(varID) Then
    lngID = CLng(varID)
    Else
    lngID = 0
    End If
    If lngID = 0 Then
    'New Record
    DoCmd.GoToRecord , , acNewRec
    Me.lblHead.Caption = strNHead
    LockSub (2)
    Else
    'Find User
    Set objFrm = Me.Form

    With objFrm.RecordsetClone
    .FindFirst strID & lngID
    If Not .NoMatch Then
    'Move to that record.
    objFrm.Bookmark = .Bookmark
    Me.lblHead.Caption = strEHead

    'Load Totals
    PurItemACEX

    Else
    'New Record
    DoCmd.GoToRecord , , acNewRec
    Me.lblHead.Caption = strNHead

    End If
    End With

    Set objFrm = Nothing
    End If

    What is the record source for the popup form - table or query?
    SQL Table - ODBC Connection - Linked controls

    Is there any code in the popup form that might be preventing the updates?
    No

    This Form has been running and not touched for about 4 years.

    Cheers

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

Similar Threads

  1. Replies: 12
    Last Post: 11-11-2014, 02:10 PM
  2. Updating form after updating and closing a popup window
    By Historypaul in forum Programming
    Replies: 2
    Last Post: 04-21-2014, 02:13 AM
  3. Updating main table from temp table AND form value
    By shabbaranks in forum Programming
    Replies: 8
    Last Post: 05-01-2013, 07:18 AM
  4. Updating Main form from a popup form
    By wdrspens in forum Forms
    Replies: 21
    Last Post: 06-13-2011, 01:34 AM
  5. Updating a table from a form
    By Lynn in forum Forms
    Replies: 3
    Last Post: 03-18-2010, 10:51 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