I have two forms.
from frmAssetsmain a button is pressed to open frmassets to enter data. The code on that button is:
Private Sub Btn_NewAsset_Click()
DoCmd.OpenForm "Assets", acNormal, , , acFormAdd
Once the information is entered on that form, another button is pressed which is supposed to save the record and update the the subform AllAssetsSubform located on FrmAssetsMain to show the new record which was added. The code I have on that button is:
Private Sub Command86_Click()
On Error GoTo Err_Command86_Click
Something here isn't working right. The first button opens up the new form with no problems, and opens it up to add a new record as I wanted, but once that data is entered and the second button is pressed, that information is NOT being saved to the table. It was working previously when I had just a DoCMD.GoToRecord command on the first button, but then it was always opening up with all the records and displaying the last record in the table instead of opening empty so a new record could just be added. But once I changed the code to what it is now, it stopped working. Could someone please tell me the error in my code to make this work?
What it's supposed to do: Open the frmAssets, enter a record, press a button, save the entry into the table, requery the underlying form to update and show the newly entered information and then go to the next blank record to allow entering of another record.