home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / query / mquery / mform1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-05-24  |  5.2 KB  |  164 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    AutoRedraw      =   -1  'True
  4.    BackColor       =   &H00FF0000&
  5.    BorderStyle     =   0  'None
  6.    Caption         =   " Visual Basic Ad-Hoc Query Sample"
  7.    ClientHeight    =   4920
  8.    ClientLeft      =   1755
  9.    ClientTop       =   2235
  10.    ClientWidth     =   8520
  11.    ClipControls    =   0   'False
  12.    ControlBox      =   0   'False
  13.    ForeColor       =   &H00FF0000&
  14.    Height          =   5385
  15.    Icon            =   MFORM1.FRX:0000
  16.    Left            =   1665
  17.    LinkTopic       =   "Form1"
  18.    MaxButton       =   0   'False
  19.    MinButton       =   0   'False
  20.    ScaleHeight     =   4920
  21.    ScaleWidth      =   8520
  22.    Top             =   1860
  23.    Width           =   8700
  24.    Begin CommonDialog CMD1 
  25.       Left            =   7725
  26.       Top             =   4065
  27.    End
  28.    Begin CommandButton cmdExit 
  29.       Caption         =   "&Exit"
  30.       Height          =   375
  31.       Left            =   4440
  32.       TabIndex        =   2
  33.       Top             =   3960
  34.       Width           =   1335
  35.    End
  36.    Begin CommandButton cmdContinue 
  37.       Caption         =   "&Continue"
  38.       Height          =   375
  39.       Left            =   2355
  40.       TabIndex        =   1
  41.       Top             =   3975
  42.       Width           =   1335
  43.    End
  44.    Begin Label Label5 
  45.       Alignment       =   2  'Center
  46.       AutoSize        =   -1  'True
  47.       BackColor       =   &H00FF0000&
  48.       Caption         =   "(This sample uses NWIND.MDB for Stored Queries)"
  49.       ForeColor       =   &H00FFFFFF&
  50.       Height          =   195
  51.       Left            =   1875
  52.       TabIndex        =   6
  53.       Top             =   2925
  54.       Width           =   4395
  55.    End
  56.    Begin Label Label4 
  57.       Alignment       =   2  'Center
  58.       AutoSize        =   -1  'True
  59.       BackColor       =   &H00FF0000&
  60.       Caption         =   "Inner && Outer Joins and Column Order"
  61.       FontBold        =   -1  'True
  62.       FontItalic      =   0   'False
  63.       FontName        =   "MS Sans Serif"
  64.       FontSize        =   12
  65.       FontStrikethru  =   0   'False
  66.       FontUnderline   =   0   'False
  67.       ForeColor       =   &H00FFFFFF&
  68.       Height          =   300
  69.       Left            =   1830
  70.       TabIndex        =   5
  71.       Top             =   2505
  72.       Width           =   4635
  73.    End
  74.    Begin Label Label3 
  75.       Alignment       =   2  'Center
  76.       AutoSize        =   -1  'True
  77.       BackColor       =   &H00FF0000&
  78.       Caption         =   "Store/Load/Delete Queries && Exec SQL Statements"
  79.       FontBold        =   -1  'True
  80.       FontItalic      =   0   'False
  81.       FontName        =   "MS Sans Serif"
  82.       FontSize        =   12
  83.       FontStrikethru  =   0   'False
  84.       FontUnderline   =   0   'False
  85.       ForeColor       =   &H00FFFFFF&
  86.       Height          =   300
  87.       Left            =   1080
  88.       TabIndex        =   4
  89.       Top             =   2160
  90.       Width           =   6225
  91.    End
  92.    Begin Label Label2 
  93.       Alignment       =   2  'Center
  94.       BackColor       =   &H00FF0000&
  95.       Caption         =   "Extracted from Microsoft's Visdata by Robert E. Smythe"
  96.       FontBold        =   -1  'True
  97.       FontItalic      =   0   'False
  98.       FontName        =   "Book Antiqua"
  99.       FontSize        =   13.5
  100.       FontStrikethru  =   0   'False
  101.       FontUnderline   =   0   'False
  102.       ForeColor       =   &H00FFFFFF&
  103.       Height          =   765
  104.       Left            =   645
  105.       TabIndex        =   3
  106.       Top             =   3375
  107.       Width           =   6945
  108.    End
  109.    Begin Label Label1 
  110.       Alignment       =   2  'Center
  111.       BackColor       =   &H00FF0000&
  112.       Caption         =   "MQUERY ENGINE FOR VISUAL BASIC Release 1.0  May 24, 1994"
  113.       FontBold        =   -1  'True
  114.       FontItalic      =   0   'False
  115.       FontName        =   "Book Antiqua"
  116.       FontSize        =   24
  117.       FontStrikethru  =   0   'False
  118.       FontUnderline   =   0   'False
  119.       ForeColor       =   &H000000FF&
  120.       Height          =   1935
  121.       Left            =   1380
  122.       TabIndex        =   0
  123.       Top             =   240
  124.       Width           =   5655
  125.    End
  126. Sub cmdContinue_Click ()
  127.    Dim Connect As String, DataBaseName As String
  128.    On Error GoTo OpenError
  129.          CMD1.Filter = "Access DBs (*.mdb)|*.mdb"
  130.          CMD1.FilterIndex = 1
  131.          CMD1.Filename = gstDBName  '""
  132.          CMD1.CancelError = True
  133.          CMD1.Action = 1
  134.        If CMD1.Filename <> "" Then
  135.          gstDBName = CMD1.Filename
  136.        Else
  137.          Exit Sub
  138.        End If
  139.        
  140.        Connect = ""
  141.        DataBaseName = gstDBName
  142.    Set gCurrentDB = OpenDatabase(DataBaseName, False, True, Connect)
  143.    RefreshTables fQuery.cTableList, True
  144.    GoTo OpenEnd
  145. OpenError:
  146.    ResetMouse Me
  147.    'gfDBOpenFlag = False
  148.    gstDBName = ""
  149.    gstDataType = ""
  150.    If Err <> 32755 Then     'check for common dialog cancelled
  151.      ShowError
  152.    End If
  153.    Resume OpenEnd
  154. OpenEnd:
  155. fQuery.Show
  156. Unload Me
  157. End Sub
  158. Sub cmdExit_Click ()
  159. End Sub
  160. Sub Form_Load ()
  161.    form1.Left = (screen.Width - form1.Width) / 2
  162.    form1.Top = (screen.Height - form1.Height) / 2
  163. End Sub
  164.