hi,
i have button click code get some data when add new record but have some bug when i set all importand fields to Required
here the code
to using this function i need to disable required field which not good because it will save uncomplete information
is the any code working if i enable required fields ?
thanks
i have button click code get some data when add new record but have some bug when i set all importand fields to Required
here the code
C#:
Private Sub Command41_Click()
Dim namasek As String, kodsek As String, jensek As String, nokpp As String, thndaftar As String
Dim tablesaya As Recordset
Dim dbsaya As Database
Set dbsaya = DBEngine.Workspaces(0).Databases(0)
Set tablesaya = dbsaya.OpenRecordset("tUtama", DB_OPEN_TABLE)
namasek = [Institusi]
kodsek = [KodInstitusi]
jensek = [JenisInstitusi]
nokpp = [No KP]
thndaftar = [tahundaftar]
With tablesaya
.AddNew
![nama] = ".Sila kemaskini nama"
![KodInstitusi] = kodsek
![JenisInstitusi] = jensek
![Institusi] = namasek
![No KP] = "000000000000"
![tahundaftar] = Year(Date)
.Update
End With
DoCmd.Close
End Sub
to using this function i need to disable required field which not good because it will save uncomplete information
is the any code working if i enable required fields ?
thanks