Board index » Visual Studio » vb6 newbie needs help!
|
wajcom
|
vb6 newbie needs help!
Visual Studio20
1. a .Alex, when I copy my project folder with my access database file in it and move copy to another directory, the program is still bound to databsebase file in the original directory. can I put the app.path in the datacontrols database property instead of the absolute path. I tried but does not work I tried in design mode app.path & "\actionamusement.mdb" but does not work, is this a syntax error. 1.b. when I connect to databse at run time using code below, the controls I bind also at run time do not save to bound fileds in database. here is the code, can you see the problem. Form_Load() with dataControl1 .databasename = app.path & "\ActionAmusements.mdb" .recordsource = "tblSales" End with txtMachine1Gross.datafield = "Machine1Gross" (field I vreated in database) I also tried inserting this statement just above the control binding statment above: txtMachine1Gross.datasource = "dataControl1" txtMachine1Gross.datafield = "Machine1Gross" (field I vreated in database) 1.c. Is one of my problems that I cannot use a datacontrol object and use database statements in code. Can I mix and match. 1.d. Shoud I and can I connect to the database without using the vbdatacontrol and just maybe SQL code? - |
