HanneSThEGreaT
August 11th, 2001, 06:24 PM
I've got this program, when I want to use the VB Dataform Wizard to connect to a database, and include the fields, it throws me an error. So, now I want to make use of the "normal" Data Control, to do the same, the problem is: How can I include Add, Delete, Edit, Update, and Close buttons to use with the Data Control¿
Can any one help, Please¿
F. T. W.
ansi
August 12th, 2001, 02:05 PM
The 'normal' data control can make use of the buttons you wanted. There are a few thing you should understand to make life easier tho :) Try to follow me...
I am going to assume you are linking to a MSAccess database.
1) Place the data control on your form (we will call it Data1 from now on).
2) Set data1.DatabaseName property to the full path and filename of the database you want to link to. (IE C:\MYPROGRAM\MYDATABASE.MDB)
**Note: VB Links to MS Access 97 DB's not 2k's DB's, so you must use Access97 DB's.***
3) Set data1.RecordSource property to the desired table you want to manipulate with data1.(IE tbl_Units)
there you go. this will link the database to the form. If you want to manipulate the data in data1 you do it through data1.Recordsource. You can pass SQL to the recordsource as well for advanced queries too! Tell me if you need to know more.
*** Remember if you change the recordsource you should .Refresh after!
Ans¡