G
Guest
When I load a form (from another form), in a one to many situation, if there is not a record found, the form is loaded with the two pieces of info (required for linking) and the current date is placed into the appropiate field. The indicator (upper left corner) shows that the record is saved, but it has not been (looked in the table to verify). I have a command button there to save the record, but that button also does not save the record until I enter some data and then manually save it.
The code in the save button follows. the commended out line was written by Access 2000 and the line after it was what I wrote in trying to solve the problem. Neither works.
Private Sub fmOrientSaveRec_Click()
On Error GoTo Err_fmOrientSaveRec_Click
' DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.RunCommand acCmdSaveRecord
Exit_fmOrientSaveRec_Click:
Exit Sub
Err_fmOrientSaveRec_Click:
MsgBox Err.Description
Resume Exit_fmOrientSaveRec_Click
End Sub
Thanks,
John H W
The code in the save button follows. the commended out line was written by Access 2000 and the line after it was what I wrote in trying to solve the problem. Neither works.
Private Sub fmOrientSaveRec_Click()
On Error GoTo Err_fmOrientSaveRec_Click
' DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.RunCommand acCmdSaveRecord
Exit_fmOrientSaveRec_Click:
Exit Sub
Err_fmOrientSaveRec_Click:
MsgBox Err.Description
Resume Exit_fmOrientSaveRec_Click
End Sub
Thanks,
John H W