home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{114982CA-D24D-11D1-82E1-D3A1673CD709}#32.0#0"; "axData.ocx"
- Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 4650
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 6750
- LinkTopic = "Form1"
- ScaleHeight = 4650
- ScaleWidth = 6750
- StartUpPosition = 3 'Windows Default
- Begin axDataControl.axData axData1
- Align = 2 'Align Bottom
- Height = 405
- Left = 0
- Top = 4245
- Width = 6750
- _ExtentX = 11906
- _ExtentY = 714
- MSDataControl = "Data1"
- End
- Begin VB.TextBox Text1
- DataField = "Title"
- DataSource = "Data1"
- Height = 330
- Left = 1215
- TabIndex = 0
- Text = "Text1"
- Top = 1620
- Width = 2895
- End
- Begin VB.Data Data1
- Caption = "Data1"
- Connect = "Access"
- DatabaseName = "Booksale.mdb"
- DefaultCursorType= 0 'DefaultCursor
- DefaultType = 2 'UseODBC
- Exclusive = 0 'False
- Height = 465
- Left = 3285
- Options = 0
- ReadOnly = 0 'False
- RecordsetType = 1 'Dynaset
- RecordSource = "Titles"
- Top = 315
- Visible = 0 'False
- Width = 2490
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- 'Private db As Database
- 'Private rs As Recordset
- 'Dim rsrdo As rdoResultset
- 'Dim cnrdo As New rdoConnection
- 'Dim clrdo As rdoColumn
- 'Dim SQL As String
- 'Const None As String = ""
- Private Sub axData1_AfterButton(Index As Integer)
- 'text1.text=rs("author")
- End Sub
- Private Sub axData1_BeforeUpdate(Cancel As Boolean)
- If Text1.Text <> "Name" Then
- Beep
- MsgBox "The name is not 'Name'"
- Cancel = True
- End If
- End Sub
- Private Sub Form_Load()
- 'Set db = OpenDatabase("Booksale.mdb")
- 'Set rs = db.OpenRecordset("authors", dbOpenTable)
- 'cnrdo.Connect = "driver={Microsoft Access Driver (*.mdb)};'"
- 'cnrdo.CursorDriver = rdUseIfNeeded
- 'cnrdo.EstablishConnection
- 'SQL = "Select * from authors"
- 'Set rsrdo = cnrdo.OpenResultset(SQL, rdOpenKeyset, rdConcurValues, rdExecDirect)
- 'Set axData1.RecordSource = rs
- End Sub
-