Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 01-25-2005, 04:44 PM   #1 (permalink)
 
Newb Techie

Join Date: Jan 2005

Posts: 1

coxy

Send a message via Yahoo to coxy
Question VB Newbie Error

Hi All I am really new to VB and I know this is straight forward so I hope am not wasting anyone's time but i can't seem to find my error

I want to create a new database using DAO code but i get an error

Compile Error: Expected line number or label or statement or end of statement after I enter the line (commondialog1.FileName, dbLangGeneral)

the code is use is this

Dim db As Database

Private Sub Command1_Click()
CommonDialog1.ShowSave
If CommonDialog1.FileName <> "" Then
Set db = DBEngine.Workspaces(0).CreateDatabase
(commondialog1.FileName, dbLangGeneral)
End If
End Sub

Private Sub Form_Load()

End Sub

I have enabled references to DAO object library 3.6, MDAC and Microsoft jet

when I execute the program it runs but when i click on the command button i get the error method or data member not found.


I have the msdn library but even that doesn't run it gives a message
the local disk does not contain the files for MSDN VS 6.0 local as expected please update location

Can someone pls help
coxy is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On