Hello,
I have a sub form AddEditEmployee within main form Admin. Both forms are not linked and only purpose of the subform is to Add/update users. I am getting error 2450 when the AddEditEmployee form is inserted as subform in the Admin form, but when open as stand alone, it doesn't throw an error when data is modify or added.
Value is null for that.
I have a sub form AddEditEmployee within main form Admin. Both forms are not linked and only purpose of the subform is to Add/update users. I am getting error 2450 when the AddEditEmployee form is inserted as subform in the Admin form, but when open as stand alone, it doesn't throw an error when data is modify or added.
Code:
Private Sub cmdSave_Click()
Dim prm As DAO.Parameter
Dim qdf As DAO.QueryDef
Dim rs As DAO.Recordset
Set qdf = CurrentDb.QueryDefs("qryUpdateUser")
For Each prm In qdf.Parameters
prm.Value = Eval(prm.Name)
Next prm
qdf.Execute dbSeeChanges + dbFailOnError
Me.cmdAdd.Enabled = True
Me.cmdSave.Enabled = False
Me.txtUserName = ""
Me.txtEmpName = ""
Me.CboAccess = ""
Me.txtLicNo = ""
Me.chkDeActive = 0
Me.cmbEmp = ""
Me.txtPin = ""
Me.txtEmpName.SetFocus
Me.Refresh
End Sub
Value is null for that.
Code:
prm.Value = Eval(prm.Name)