Cvp: Bookmark Ve Openargs Hakkında. - accessman - 31/03/2020
Sub LastModifiedX()
Dim dbsNorthwind As Database
Dim rstEmployees As Recordset
Dim strFirst As String
Dim strLast As String
Set dbsNorthwind = OpenDatabase("Northwind.mdb")
Set rstEmployees = _
dbsNorthwind.OpenRecordset("Employees", _
dbOpenDynaset)
With rstEmployees
' Store current data.
strFirst = !FirstName
strLast = !LastName
' Change data in current record.
.Edit
!FirstName = "Julie"
!LastName = "Warren"
.Update
' Move current record pointer to the most recently
' changed or added record.
.Bookmark = .LastModified
Debug.Print _
"Data in LastModified record after Edit: " & _
!FirstName & " " & !LastName
' Restore original data because this is a demonstration.
.Edit
!FirstName = strFirst
!LastName = strLast
.Update
' Add new record.
.AddNew
!FirstName = "Roger"
!LastName = "Harui"
.Update
' Move current record pointer to the most recently
' changed or added record.
.Bookmark = .LastModified
Debug.Print _
"Data in LastModified record after AddNew: " & _
!FirstName & " " & !LastName
' Delete new record because this is a demonstration.
.Delete
.Close
End With
dbsNorthwind.Close
End Sub
Bu örnek, geçerli kayıt işaretçisini değiştirilmiş bir kayda ve yeni oluşturulan bir kayda taşımak için LastModified özelliğini kullanır.
Cvp: Bookmark Ve Openargs Hakkında. - berduş - 31/03/2020
Bookmarkı sayı makinesi gibi düşünün kapidan giren her kişiye benzersiz bir numara verir ve görevli bir numarayı çağırınca numara kimdeyse giseye o gider
Cvp: Bookmark Ve Openargs Hakkında. - accessman - 31/03/2020
Bu örnek, kullanıcının Kayıt Kümesindeki bir kaydı işaretlemesine ve daha sonra geri dönmesine izin vermek için Yer İşareti ve Yer İşareti Kullanılabilir özelliklerini kullanır.
Sub BookmarkX()
Dim dbsNorthwind As Database
Dim rstCategories As Recordset
Dim strMessage As String
Dim intCommand As Integer
Dim varBookmark As Variant
Set dbsNorthwind = OpenDatabase("Northwind.mdb")
Set rstCategories = _
dbsNorthwind.OpenRecordset("Categories", _
dbOpenSnapshot)
With rstCategories
If .Bookmarkable = False Then
Debug.Print "Recordset is not Bookmarkable!"
Else
' Populate Recordset.
.MoveLast
.MoveFirst
Do While True
' Show information about current record and get
' user input.
strMessage = "Category: " & !CategoryName & _
" (record " & (.AbsolutePosition + 1) & _
" of " & .RecordCount & ")" & vbCr & _
"Enter command:" & vbCr & _
"[1 - next / 2 - previous /" & vbCr & _
"3 - set bookmark / 4 - go to bookmark]"
intCommand = Val(InputBox(strMessage))
Select Case intCommand
' Move forward or backward, trapping for BOF
' or EOF.
Case 1
.MoveNext
If .EOF Then .MoveLast
Case 2
.MovePrevious
If .BOF Then .MoveFirst
' Store the bookmark of the current record.
Case 3
varBookmark = .Bookmark
' Go to the record indicated by the stored
' bookmark.
Case 4
If IsEmpty(varBookmark) Then
MsgBox "No Bookmark set!"
Else
.Bookmark = varBookmark
End If
Case Else
Exit Do
End Select
Loop
End If
.Close
End With
dbsNorthwind.Close
End Sub
Cvp: Bookmark Ve Openargs Hakkında. - feraz - 31/03/2020
Yorumları okudum me.bookmark=10 dersek 100 satırlık formda 10.satıramı gider imleç yada tam ne olduğunu bilmiyorum yer işaretçisi heralde.
Cvp: Bookmark Ve Openargs Hakkında. - accessman - 31/03/2020
bankadaki gizli kasa gibi
içine ne koyduysan o çıkıyor yani o anda bookmarka hangi kaydı koyduysan o
asıl mesele şu ki
If .Bookmarkable = False Then
Debug.Print "Recordset is not Bookmarkable!"
Else
burada "Bookmarkable" nedir
Cvp: Bookmark Ve Openargs Hakkında. - feraz - 31/03/2020
Kullanım amacı nedir?
|