home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / axdata / form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-02-02  |  2.6 KB  |  82 lines

  1. VERSION 5.00
  2. Object = "{114982CA-D24D-11D1-82E1-D3A1673CD709}#32.0#0"; "axData.ocx"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   4650
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   6750
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   4650
  11.    ScaleWidth      =   6750
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin axDataControl.axData axData1 
  14.       Align           =   2  'Align Bottom
  15.       Height          =   405
  16.       Left            =   0
  17.       Top             =   4245
  18.       Width           =   6750
  19.       _ExtentX        =   11906
  20.       _ExtentY        =   714
  21.       MSDataControl   =   "Data1"
  22.    End
  23.    Begin VB.TextBox Text1 
  24.       DataField       =   "Title"
  25.       DataSource      =   "Data1"
  26.       Height          =   330
  27.       Left            =   1215
  28.       TabIndex        =   0
  29.       Text            =   "Text1"
  30.       Top             =   1620
  31.       Width           =   2895
  32.    End
  33.    Begin VB.Data Data1 
  34.       Caption         =   "Data1"
  35.       Connect         =   "Access"
  36.       DatabaseName    =   "Booksale.mdb"
  37.       DefaultCursorType=   0  'DefaultCursor
  38.       DefaultType     =   2  'UseODBC
  39.       Exclusive       =   0   'False
  40.       Height          =   465
  41.       Left            =   3285
  42.       Options         =   0
  43.       ReadOnly        =   0   'False
  44.       RecordsetType   =   1  'Dynaset
  45.       RecordSource    =   "Titles"
  46.       Top             =   315
  47.       Visible         =   0   'False
  48.       Width           =   2490
  49.    End
  50. Attribute VB_Name = "Form1"
  51. Attribute VB_GlobalNameSpace = False
  52. Attribute VB_Creatable = False
  53. Attribute VB_PredeclaredId = True
  54. Attribute VB_Exposed = False
  55. 'Private db As Database
  56. 'Private rs As Recordset
  57. 'Dim rsrdo As rdoResultset
  58. 'Dim cnrdo As New rdoConnection
  59. 'Dim clrdo As rdoColumn
  60. 'Dim SQL As String
  61. 'Const None As String = ""
  62. Private Sub axData1_AfterButton(Index As Integer)
  63.   'text1.text=rs("author")
  64. End Sub
  65. Private Sub axData1_BeforeUpdate(Cancel As Boolean)
  66.   If Text1.Text <> "Name" Then
  67.     Beep
  68.     MsgBox "The name is not 'Name'"
  69.     Cancel = True
  70.   End If
  71. End Sub
  72. Private Sub Form_Load()
  73. 'Set db = OpenDatabase("Booksale.mdb")
  74. 'Set rs = db.OpenRecordset("authors", dbOpenTable)
  75. 'cnrdo.Connect = "driver={Microsoft Access Driver (*.mdb)};'"
  76. 'cnrdo.CursorDriver = rdUseIfNeeded
  77. 'cnrdo.EstablishConnection
  78. 'SQL = "Select * from authors"
  79. 'Set rsrdo = cnrdo.OpenResultset(SQL, rdOpenKeyset, rdConcurValues, rdExecDirect)
  80. 'Set axData1.RecordSource = rs
  81. End Sub
  82.