Adding a new record to a table from a split form

nrypka

Registered User.
Local time
Today, 04:57
Joined
Jul 19, 2016
Messages
16
I am attempting to create a form that has the functionality to search and to add a record all in a split form. I have the 'Search' portion working well, as well as the 'Reset' and 'Print Records' buttons. I had all of it working perfectly with the record source being a table, except for the fact that when I added a new record, the fields that are not directly entered but inferred from the other data, were not updating. I have changed things around so many times now trying to get it to work. This is the simple code I had that was working when the source was a table. I do have data entry set to yes, as well as allow additions and no record locks. Any help would be great. Thank you.

Code:
Private Sub Command312_Click()
On Error GoTo Command312_Click_Err

    On Error Resume Next
    DoCmd.GoToRecord , "", acNewRec
    If (MacroError <> 0) Then
        Beep
        MsgBox MacroError.Description, vbOKOnly, ""
            End If


Command312_Click_Exit:
    Exit Sub

Command312_Click_Err:
    MsgBox Error$
    Resume Command312_Click_Exit

End Sub
 
mdb screen shot.PNG

Here is a picture of the the form for further clarification
 

Users who are viewing this thread

Back
Top Bottom