Add the following code to your form
Set db = CurrentDb
Set dbs = CurrentDb()
Set rec = db.OpenRecordset("Select * from OperationManager")
rec.AddNew
rec("OMName") = Me.txtOMName.Value
rec("OMCode") = Me.txtOMCode.Value
rec("OMEmail") = Me.txtOMEmailId.Value
rec("OMPhoneNo") = Me.txtOMPhone.Value
rec.Update
'close connections
Set rec = Nothing
Set db = Nothing
Set db = CurrentDb
Set dbs = CurrentDb()
Set rec = db.OpenRecordset("Select * from OperationManager")
rec.AddNew
rec("OMName") = Me.txtOMName.Value
rec("OMCode") = Me.txtOMCode.Value
rec("OMEmail") = Me.txtOMEmailId.Value
rec("OMPhoneNo") = Me.txtOMPhone.Value
rec.Update
'close connections
Set rec = Nothing
Set db = Nothing
No comments:
Post a Comment