that doesnt seem to be working
here is the code for my form:
Dim iHeight As Integer
Dim iWidth As Integer
Public db As Database, rs As Recordset
Public cTblName As String
Public cdbName As String
========================================
Private Sub cmdBalance_Click()
frmBalance.Show
Unload Me
End Sub
========================================
Private Sub cmdQuit_Click()
Unload Me
End
End Sub
========================================
Private Sub Form_Load()
iHeight = Me.Height
iWidth = Me.Width
End Sub
========================================
Private Sub Form_Resize()
On Error Resume Next
Me.Height = iHeight
Me.Width = iWidth
End Sub
========================================
Private Sub Open_Click(Index As Integer)
On Error GoTo ErrHandler
'set filters
CommonDialog1.Filter = "DBF (*.dbf)|*.dbf"
'display file open box
CommonDialog1.ShowOpen
Data1.DatabaseName = CommonDialog1.filename 'sets database as selected file
Call OpenDB
'
Set db = Workspaces(0).OpenDatabase(cdbName)
Set rs = db.OpenRecordset(cTblName)
ErrHandler:
Exit Sub
End Sub
========================================
Public Sub OpenDB()
Dim AppPath$
If Right(App.Path, 1) <> "\" Then _
AppPath = App.Path & "\" _
Else AppPath = App.Path
cdbName = AppPath & CommonDialog1.filename
cTblName = "MARKET"
Data1.DatabaseName = cdbName
Data1.RecordSource = cTblName
Text2.DataField = "MARKET"
Data1.Refresh
End Sub
========================================
when i run the project as is it will run but nothing shows up in the text box (text2) when i select the database.