Why save institution code and other institution info - why not just save the institution code?Yes, code like that.
Still didn't answer my questions.
other are info are not connector
so need to insert other info
Why save institution code and other institution info - why not just save the institution code?Yes, code like that.
Still didn't answer my questions.
Dim db As Database
Dim rec As Recordset
Set db = CurrentDb
Set rec = db.OpenRecordset("Select * from TGuruIPS")
rec.Edit
rec("KodInstitusi") = Me.textkodips
rec("JenisInstitusi") = Me.textjenisips
rec("Institusi") = Me.textnamaips
rec("Alamat") = Me.textalamatpenuh
rec.Update
rec.Close
DoCmd.OpenQuery "qListGuru"
Me![listsemuaguru].Requery
DoCmd.Close
DoCmd.OpenQuery "QListFilterGuru"
Me![listgurufilterips].Requery
DoCmd.Close
O/P was doing it from first post..MoveLast
.MoveFirst
was my suggested code. Building from memory. Gasman is correct, should not be needed. Since you removed them in lastest code, should no longer be issue. But again, the SQL does not have filter criteria.
Private Sub listsemuaguru_DblClick(Cancel As Integer)
Me![listgurufilterips].Requery
Dim tguru As Integer, RESPON As String
Dim MyDB As DAO.Database, MyTable As DAO.Recordset
Dim JWBCONFIRM As String
Set MyDB = CurrentDb
Set MyTable = MyDB.OpenRecordset("TGuruIPS", DB_OPEN_TABLE)
With MyTable
'check if there is record in the table
If Not (.BOF And .EOF) Then
MyTable.Index = "NamaGuru"
MyTable.Seek "=", Forms![FkemaskiniPG]![listsemuaguru]
'check if we found the record
If Not .NoMatch Then
.Edit
!KodInstitusi = [kodips]
!JenisInstitusi = [jenisips]
!Institusi = [namaips]
!Alamat = [alamatpenuh]
.Update
End If
End If
.Close
End With
DoCmd.OpenQuery "qListGuru"
Me![listsemuaguru].Requery
DoCmd.Close
DoCmd.OpenQuery "QListFilterGuru"
Me![listgurufilterips].Requery
DoCmd.Close
End Sub
Private Sub listsemuaguru_DblClick(Cancel As Integer)
Dim clnpusatini As Integer, RESPON As String
Dim db As Database
Dim rec As Recordset
Set db = CurrentDb
Set rec = db.OpenRecordset("SELECT * FROM TGuruIPS WHERE NamaGuru='" & Forms![FkemaskiniPG]![listsemuaguru] & "'")
rec.Edit
rec("KodInstitusi") = Me.textkodips
rec("JenisInstitusi") = Me.textjenisips
rec("Institusi") = Me.textnamaips
rec("Alamat") = Me.textalamatpenuh
rec.Update
rec.Close
DoCmd.OpenQuery "qListGuru"
Me![listsemuaguru].Requery
DoCmd.Close
DoCmd.OpenQuery "QListFilterGuru"
Me![listgurufilterips].Requery
DoCmd.Close
End Sub