MS Access - #DELETED when adding a record Announcing the arrival of Valued Associate #679:...

Why is black pepper both grey and black?

Is the Standard Deduction better than Itemized when both are the same amount?

When is phishing education going too far?

How do I keep my slimes from escaping their pens?

How widely used is the term Treppenwitz? Is it something that most Germans know?

Proof involving the spectral radius and the Jordan canonical form

How to recreate this effect in Photoshop?

The logistics of corpse disposal

What are 'alternative tunings' of a guitar and why would you use them? Doesn't it make it more difficult to play?

Is the address of a local variable a constexpr?

Did Kevin spill real chili?

How discoverable are IPv6 addresses and AAAA names by potential attackers?

Were Kohanim forbidden from serving in King David's army?

When to stop saving and start investing?

How do I mention the quality of my school without bragging

Why did the IBM 650 use bi-quinary?

What causes the vertical darker bands in my photo?

Withdrew £2800, but only £2000 shows as withdrawn on online banking; what are my obligations?

Diagram with tikz

What are the pros and cons of Aerospike nosecones?

What are the motives behind Cersei's orders given to Bronn?

Should I discuss the type of campaign with my players?

Determinant is linear as a function of each of the rows of the matrix.

ListPlot join points by nearest neighbor rather than order



MS Access - #DELETED when adding a record



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)MS Access Forms: Store number is table, display text in ComboBoxHow to one-click print in Access 2010MS Access subform not allowing data entry after upgrading from 2003 to 2013Not Inserting new records instead it updates the last record in Ms access vbaremove leading 0 in front of decimal except when a a non-zero number precedes itComboBox Keypress and transferring data from excel user form to sheet tableAll INSERTs done through MS Access old untouched forms now fail after creating new unrelated formsMS Access Conditional formatting not workingPopulate a cell with data from a sub when excel template opensMS Access Me.Refresh doesn't work





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I'm using an MS Access 2010 .accdb database connected to a SQL Server 2016 database. My tables and views from SQL are managed as linked tables in MS Access. I'm using a DSNless connection with the SQL Server Native Client 11.0 driver (don't know if this matters or not).



I have a view/search form that enables users to view records in the database. The form has an Edit-this-Record button and an Add-New-Record button.



I have an edit/create form which uses an updateable SQL Server query. This form has a number of mandatory combobox fields and one combobox field which is optional. The form also has a number of other fields - text and date.



The code of the Add-New-Record button on the view/search form is as follows;



DoCmd.OpenForm "Application Edit - Template", acNormal, "", "", acAdd, acDialog


The edit/create form has a Save-And-Close button with the following code;



Private Sub btnSaveClose_Click()
On Error GoTo btnSaveClose_Click_Err

' Save the edits to the form i.e. the main form
'DoCmd.RunCommand acCmdSaveRecord

If Me.Dirty Then
Me.Dirty = False
End If

'Close the form

DoCmd.Close acForm, "Application Edit - Template"

btnSaveClose_Click_Exit:
Exit Sub

btnSaveClose_Click_Err:
MsgBox Error$
Resume btnSaveClose_Click_Exit

End Sub


In order to display the newly created record in view/search form the following code has been added to the After_Update event of the edit/create form.



Private Sub Form_AfterUpdate()
Dim rst As DAO.Recordset

'Refresh the record to get the latest data that has been saved
'note that this is primarily to refresh the record details
'i.e. last updated by and Last update date time.

Me.Refresh

'If it's a new record...
If boolNewRecord Then
'Refresh the browse form so that the newly saved record is in the recordset
'We set boolBypassFormCurrent = True so we can bypass the redundant
'calls to the Form_Current event on the view/search form

boolBypassFormCurrent = True
[Forms]![Application Browse - Template].Requery

'Navigate the browse form to the newly saved record
Set rst = Forms("Application Browse - Template").RecordsetClone
With rst
.FindFirst "[DB_Key] = " & Me.txtDBKey <=== Failure Here!
If Not .NoMatch Then
Forms("Application Browse - Template").Bookmark = .Bookmark
End If
End With
Set rst = Nothing
End If
boolNewRecord = False
boolBypassFormCurrent = False

btnSaveClose.Enabled = False

End Sub


Once the edit/create form is displayed, if the user supplies values for all comboboxes, including the optional one, and saves the record, everything works as desired (the record is saved, the view/search form is updated to display the new record, and the edit/create form is closed). If the the optional combobox is left blank and the record is saved, everything works as desired. If a value is initially supplied for the optional combobox and then, before saving, the optional value is cleared and then the record is saved, the following error is thrown;



Run-time error: '3077' Syntax error (missing operator) in expression.



The debugger stops at the line;



.FindFirst "[DB_Key]  = " & Me.txtDBKey


In the form, all fields which are not comboboxes display the value - #Deleted



Typing ?Me.txtDBKey in the immediate window reveals that its value is an empty string i.e. blank (not null).



I believe that because Me.txtDBKey is blank that the code is effectively being interpreted as;



rst.FindFirst [DB_Key] =


Which would explain the error message.



When the debugger is terminated and the edit/create form is closed - returning control to the view/search form, the record that the user was attempting to add is displayed!



It's as though the saved record somehow flies away from the edit/create form when the record is saved - before the After_Update event, only in the case when the optional combobox is set and then unset.



Can anyone explain this very unfriendly behavior? Anyone have any ideas for eliminating it?



It's worth noting that if the user edits an existing record (choses the Edit-this-Record button on the view/search form) and removes the value from the optional combobox and saves the record everything works as desired.



I've done considerable searching on this error and have not been able to find anything that matches my problem. The table underneath the SQL view has an integer primary key and a RowVersion column which are both included in the view. MS Access detects the primary key and also correctly identifies the RowVersion column.



Thank you in advance for your assistance with this very vexing problem.










share|improve this question





























    0















    I'm using an MS Access 2010 .accdb database connected to a SQL Server 2016 database. My tables and views from SQL are managed as linked tables in MS Access. I'm using a DSNless connection with the SQL Server Native Client 11.0 driver (don't know if this matters or not).



    I have a view/search form that enables users to view records in the database. The form has an Edit-this-Record button and an Add-New-Record button.



    I have an edit/create form which uses an updateable SQL Server query. This form has a number of mandatory combobox fields and one combobox field which is optional. The form also has a number of other fields - text and date.



    The code of the Add-New-Record button on the view/search form is as follows;



    DoCmd.OpenForm "Application Edit - Template", acNormal, "", "", acAdd, acDialog


    The edit/create form has a Save-And-Close button with the following code;



    Private Sub btnSaveClose_Click()
    On Error GoTo btnSaveClose_Click_Err

    ' Save the edits to the form i.e. the main form
    'DoCmd.RunCommand acCmdSaveRecord

    If Me.Dirty Then
    Me.Dirty = False
    End If

    'Close the form

    DoCmd.Close acForm, "Application Edit - Template"

    btnSaveClose_Click_Exit:
    Exit Sub

    btnSaveClose_Click_Err:
    MsgBox Error$
    Resume btnSaveClose_Click_Exit

    End Sub


    In order to display the newly created record in view/search form the following code has been added to the After_Update event of the edit/create form.



    Private Sub Form_AfterUpdate()
    Dim rst As DAO.Recordset

    'Refresh the record to get the latest data that has been saved
    'note that this is primarily to refresh the record details
    'i.e. last updated by and Last update date time.

    Me.Refresh

    'If it's a new record...
    If boolNewRecord Then
    'Refresh the browse form so that the newly saved record is in the recordset
    'We set boolBypassFormCurrent = True so we can bypass the redundant
    'calls to the Form_Current event on the view/search form

    boolBypassFormCurrent = True
    [Forms]![Application Browse - Template].Requery

    'Navigate the browse form to the newly saved record
    Set rst = Forms("Application Browse - Template").RecordsetClone
    With rst
    .FindFirst "[DB_Key] = " & Me.txtDBKey <=== Failure Here!
    If Not .NoMatch Then
    Forms("Application Browse - Template").Bookmark = .Bookmark
    End If
    End With
    Set rst = Nothing
    End If
    boolNewRecord = False
    boolBypassFormCurrent = False

    btnSaveClose.Enabled = False

    End Sub


    Once the edit/create form is displayed, if the user supplies values for all comboboxes, including the optional one, and saves the record, everything works as desired (the record is saved, the view/search form is updated to display the new record, and the edit/create form is closed). If the the optional combobox is left blank and the record is saved, everything works as desired. If a value is initially supplied for the optional combobox and then, before saving, the optional value is cleared and then the record is saved, the following error is thrown;



    Run-time error: '3077' Syntax error (missing operator) in expression.



    The debugger stops at the line;



    .FindFirst "[DB_Key]  = " & Me.txtDBKey


    In the form, all fields which are not comboboxes display the value - #Deleted



    Typing ?Me.txtDBKey in the immediate window reveals that its value is an empty string i.e. blank (not null).



    I believe that because Me.txtDBKey is blank that the code is effectively being interpreted as;



    rst.FindFirst [DB_Key] =


    Which would explain the error message.



    When the debugger is terminated and the edit/create form is closed - returning control to the view/search form, the record that the user was attempting to add is displayed!



    It's as though the saved record somehow flies away from the edit/create form when the record is saved - before the After_Update event, only in the case when the optional combobox is set and then unset.



    Can anyone explain this very unfriendly behavior? Anyone have any ideas for eliminating it?



    It's worth noting that if the user edits an existing record (choses the Edit-this-Record button on the view/search form) and removes the value from the optional combobox and saves the record everything works as desired.



    I've done considerable searching on this error and have not been able to find anything that matches my problem. The table underneath the SQL view has an integer primary key and a RowVersion column which are both included in the view. MS Access detects the primary key and also correctly identifies the RowVersion column.



    Thank you in advance for your assistance with this very vexing problem.










    share|improve this question

























      0












      0








      0








      I'm using an MS Access 2010 .accdb database connected to a SQL Server 2016 database. My tables and views from SQL are managed as linked tables in MS Access. I'm using a DSNless connection with the SQL Server Native Client 11.0 driver (don't know if this matters or not).



      I have a view/search form that enables users to view records in the database. The form has an Edit-this-Record button and an Add-New-Record button.



      I have an edit/create form which uses an updateable SQL Server query. This form has a number of mandatory combobox fields and one combobox field which is optional. The form also has a number of other fields - text and date.



      The code of the Add-New-Record button on the view/search form is as follows;



      DoCmd.OpenForm "Application Edit - Template", acNormal, "", "", acAdd, acDialog


      The edit/create form has a Save-And-Close button with the following code;



      Private Sub btnSaveClose_Click()
      On Error GoTo btnSaveClose_Click_Err

      ' Save the edits to the form i.e. the main form
      'DoCmd.RunCommand acCmdSaveRecord

      If Me.Dirty Then
      Me.Dirty = False
      End If

      'Close the form

      DoCmd.Close acForm, "Application Edit - Template"

      btnSaveClose_Click_Exit:
      Exit Sub

      btnSaveClose_Click_Err:
      MsgBox Error$
      Resume btnSaveClose_Click_Exit

      End Sub


      In order to display the newly created record in view/search form the following code has been added to the After_Update event of the edit/create form.



      Private Sub Form_AfterUpdate()
      Dim rst As DAO.Recordset

      'Refresh the record to get the latest data that has been saved
      'note that this is primarily to refresh the record details
      'i.e. last updated by and Last update date time.

      Me.Refresh

      'If it's a new record...
      If boolNewRecord Then
      'Refresh the browse form so that the newly saved record is in the recordset
      'We set boolBypassFormCurrent = True so we can bypass the redundant
      'calls to the Form_Current event on the view/search form

      boolBypassFormCurrent = True
      [Forms]![Application Browse - Template].Requery

      'Navigate the browse form to the newly saved record
      Set rst = Forms("Application Browse - Template").RecordsetClone
      With rst
      .FindFirst "[DB_Key] = " & Me.txtDBKey <=== Failure Here!
      If Not .NoMatch Then
      Forms("Application Browse - Template").Bookmark = .Bookmark
      End If
      End With
      Set rst = Nothing
      End If
      boolNewRecord = False
      boolBypassFormCurrent = False

      btnSaveClose.Enabled = False

      End Sub


      Once the edit/create form is displayed, if the user supplies values for all comboboxes, including the optional one, and saves the record, everything works as desired (the record is saved, the view/search form is updated to display the new record, and the edit/create form is closed). If the the optional combobox is left blank and the record is saved, everything works as desired. If a value is initially supplied for the optional combobox and then, before saving, the optional value is cleared and then the record is saved, the following error is thrown;



      Run-time error: '3077' Syntax error (missing operator) in expression.



      The debugger stops at the line;



      .FindFirst "[DB_Key]  = " & Me.txtDBKey


      In the form, all fields which are not comboboxes display the value - #Deleted



      Typing ?Me.txtDBKey in the immediate window reveals that its value is an empty string i.e. blank (not null).



      I believe that because Me.txtDBKey is blank that the code is effectively being interpreted as;



      rst.FindFirst [DB_Key] =


      Which would explain the error message.



      When the debugger is terminated and the edit/create form is closed - returning control to the view/search form, the record that the user was attempting to add is displayed!



      It's as though the saved record somehow flies away from the edit/create form when the record is saved - before the After_Update event, only in the case when the optional combobox is set and then unset.



      Can anyone explain this very unfriendly behavior? Anyone have any ideas for eliminating it?



      It's worth noting that if the user edits an existing record (choses the Edit-this-Record button on the view/search form) and removes the value from the optional combobox and saves the record everything works as desired.



      I've done considerable searching on this error and have not been able to find anything that matches my problem. The table underneath the SQL view has an integer primary key and a RowVersion column which are both included in the view. MS Access detects the primary key and also correctly identifies the RowVersion column.



      Thank you in advance for your assistance with this very vexing problem.










      share|improve this question














      I'm using an MS Access 2010 .accdb database connected to a SQL Server 2016 database. My tables and views from SQL are managed as linked tables in MS Access. I'm using a DSNless connection with the SQL Server Native Client 11.0 driver (don't know if this matters or not).



      I have a view/search form that enables users to view records in the database. The form has an Edit-this-Record button and an Add-New-Record button.



      I have an edit/create form which uses an updateable SQL Server query. This form has a number of mandatory combobox fields and one combobox field which is optional. The form also has a number of other fields - text and date.



      The code of the Add-New-Record button on the view/search form is as follows;



      DoCmd.OpenForm "Application Edit - Template", acNormal, "", "", acAdd, acDialog


      The edit/create form has a Save-And-Close button with the following code;



      Private Sub btnSaveClose_Click()
      On Error GoTo btnSaveClose_Click_Err

      ' Save the edits to the form i.e. the main form
      'DoCmd.RunCommand acCmdSaveRecord

      If Me.Dirty Then
      Me.Dirty = False
      End If

      'Close the form

      DoCmd.Close acForm, "Application Edit - Template"

      btnSaveClose_Click_Exit:
      Exit Sub

      btnSaveClose_Click_Err:
      MsgBox Error$
      Resume btnSaveClose_Click_Exit

      End Sub


      In order to display the newly created record in view/search form the following code has been added to the After_Update event of the edit/create form.



      Private Sub Form_AfterUpdate()
      Dim rst As DAO.Recordset

      'Refresh the record to get the latest data that has been saved
      'note that this is primarily to refresh the record details
      'i.e. last updated by and Last update date time.

      Me.Refresh

      'If it's a new record...
      If boolNewRecord Then
      'Refresh the browse form so that the newly saved record is in the recordset
      'We set boolBypassFormCurrent = True so we can bypass the redundant
      'calls to the Form_Current event on the view/search form

      boolBypassFormCurrent = True
      [Forms]![Application Browse - Template].Requery

      'Navigate the browse form to the newly saved record
      Set rst = Forms("Application Browse - Template").RecordsetClone
      With rst
      .FindFirst "[DB_Key] = " & Me.txtDBKey <=== Failure Here!
      If Not .NoMatch Then
      Forms("Application Browse - Template").Bookmark = .Bookmark
      End If
      End With
      Set rst = Nothing
      End If
      boolNewRecord = False
      boolBypassFormCurrent = False

      btnSaveClose.Enabled = False

      End Sub


      Once the edit/create form is displayed, if the user supplies values for all comboboxes, including the optional one, and saves the record, everything works as desired (the record is saved, the view/search form is updated to display the new record, and the edit/create form is closed). If the the optional combobox is left blank and the record is saved, everything works as desired. If a value is initially supplied for the optional combobox and then, before saving, the optional value is cleared and then the record is saved, the following error is thrown;



      Run-time error: '3077' Syntax error (missing operator) in expression.



      The debugger stops at the line;



      .FindFirst "[DB_Key]  = " & Me.txtDBKey


      In the form, all fields which are not comboboxes display the value - #Deleted



      Typing ?Me.txtDBKey in the immediate window reveals that its value is an empty string i.e. blank (not null).



      I believe that because Me.txtDBKey is blank that the code is effectively being interpreted as;



      rst.FindFirst [DB_Key] =


      Which would explain the error message.



      When the debugger is terminated and the edit/create form is closed - returning control to the view/search form, the record that the user was attempting to add is displayed!



      It's as though the saved record somehow flies away from the edit/create form when the record is saved - before the After_Update event, only in the case when the optional combobox is set and then unset.



      Can anyone explain this very unfriendly behavior? Anyone have any ideas for eliminating it?



      It's worth noting that if the user edits an existing record (choses the Edit-this-Record button on the view/search form) and removes the value from the optional combobox and saves the record everything works as desired.



      I've done considerable searching on this error and have not been able to find anything that matches my problem. The table underneath the SQL view has an integer primary key and a RowVersion column which are both included in the view. MS Access detects the primary key and also correctly identifies the RowVersion column.



      Thank you in advance for your assistance with this very vexing problem.







      vba microsoft-access sql-server






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked yesterday









      CanuckBuckCanuckBuck

      217




      217






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Could you not simply test whether Me.txtDBKey is null or an empty string and branch accordingly?



          For example:



          If IsNull(Me.txtDBKey) Or Me.txtDBKey = vbNullString Then
          ' Notify user?
          Else
          'Navigate the browse form to the newly saved record
          Set rst = Forms("Application Browse - Template").RecordsetClone
          With rst
          .FindFirst "[DB_Key] = " & Me.txtDBKey
          If Not .NoMatch Then
          Forms("Application Browse - Template").Bookmark = .Bookmark
          End If
          End With
          Set rst = Nothing
          End If





          share|improve this answer
























          • Lee; Thanks for the response. If all else fails (meaning no one has an answer for this question) this or something similar (e.g. using error trapping code to at the least communicate the situation to the user and possibly preventing them from clearing the field before saving) may be the approach to take. However, this would be responding to the symptom and not addressing the cause.

            – CanuckBuck
            9 hours ago












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1425486%2fms-access-deleted-when-adding-a-record%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Could you not simply test whether Me.txtDBKey is null or an empty string and branch accordingly?



          For example:



          If IsNull(Me.txtDBKey) Or Me.txtDBKey = vbNullString Then
          ' Notify user?
          Else
          'Navigate the browse form to the newly saved record
          Set rst = Forms("Application Browse - Template").RecordsetClone
          With rst
          .FindFirst "[DB_Key] = " & Me.txtDBKey
          If Not .NoMatch Then
          Forms("Application Browse - Template").Bookmark = .Bookmark
          End If
          End With
          Set rst = Nothing
          End If





          share|improve this answer
























          • Lee; Thanks for the response. If all else fails (meaning no one has an answer for this question) this or something similar (e.g. using error trapping code to at the least communicate the situation to the user and possibly preventing them from clearing the field before saving) may be the approach to take. However, this would be responding to the symptom and not addressing the cause.

            – CanuckBuck
            9 hours ago
















          0














          Could you not simply test whether Me.txtDBKey is null or an empty string and branch accordingly?



          For example:



          If IsNull(Me.txtDBKey) Or Me.txtDBKey = vbNullString Then
          ' Notify user?
          Else
          'Navigate the browse form to the newly saved record
          Set rst = Forms("Application Browse - Template").RecordsetClone
          With rst
          .FindFirst "[DB_Key] = " & Me.txtDBKey
          If Not .NoMatch Then
          Forms("Application Browse - Template").Bookmark = .Bookmark
          End If
          End With
          Set rst = Nothing
          End If





          share|improve this answer
























          • Lee; Thanks for the response. If all else fails (meaning no one has an answer for this question) this or something similar (e.g. using error trapping code to at the least communicate the situation to the user and possibly preventing them from clearing the field before saving) may be the approach to take. However, this would be responding to the symptom and not addressing the cause.

            – CanuckBuck
            9 hours ago














          0












          0








          0







          Could you not simply test whether Me.txtDBKey is null or an empty string and branch accordingly?



          For example:



          If IsNull(Me.txtDBKey) Or Me.txtDBKey = vbNullString Then
          ' Notify user?
          Else
          'Navigate the browse form to the newly saved record
          Set rst = Forms("Application Browse - Template").RecordsetClone
          With rst
          .FindFirst "[DB_Key] = " & Me.txtDBKey
          If Not .NoMatch Then
          Forms("Application Browse - Template").Bookmark = .Bookmark
          End If
          End With
          Set rst = Nothing
          End If





          share|improve this answer













          Could you not simply test whether Me.txtDBKey is null or an empty string and branch accordingly?



          For example:



          If IsNull(Me.txtDBKey) Or Me.txtDBKey = vbNullString Then
          ' Notify user?
          Else
          'Navigate the browse form to the newly saved record
          Set rst = Forms("Application Browse - Template").RecordsetClone
          With rst
          .FindFirst "[DB_Key] = " & Me.txtDBKey
          If Not .NoMatch Then
          Forms("Application Browse - Template").Bookmark = .Bookmark
          End If
          End With
          Set rst = Nothing
          End If






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 11 hours ago









          Lee MacLee Mac

          452213




          452213













          • Lee; Thanks for the response. If all else fails (meaning no one has an answer for this question) this or something similar (e.g. using error trapping code to at the least communicate the situation to the user and possibly preventing them from clearing the field before saving) may be the approach to take. However, this would be responding to the symptom and not addressing the cause.

            – CanuckBuck
            9 hours ago



















          • Lee; Thanks for the response. If all else fails (meaning no one has an answer for this question) this or something similar (e.g. using error trapping code to at the least communicate the situation to the user and possibly preventing them from clearing the field before saving) may be the approach to take. However, this would be responding to the symptom and not addressing the cause.

            – CanuckBuck
            9 hours ago

















          Lee; Thanks for the response. If all else fails (meaning no one has an answer for this question) this or something similar (e.g. using error trapping code to at the least communicate the situation to the user and possibly preventing them from clearing the field before saving) may be the approach to take. However, this would be responding to the symptom and not addressing the cause.

          – CanuckBuck
          9 hours ago





          Lee; Thanks for the response. If all else fails (meaning no one has an answer for this question) this or something similar (e.g. using error trapping code to at the least communicate the situation to the user and possibly preventing them from clearing the field before saving) may be the approach to take. However, this would be responding to the symptom and not addressing the cause.

          – CanuckBuck
          9 hours ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1425486%2fms-access-deleted-when-adding-a-record%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...

          Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

          VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...