Visual Basic + Access [Archive] - SpeedGuide.net Broadband Community

View Full Version : Visual Basic + Access


cy
05-10-02, 10:58 AM
I m currently working on a computer science project which require linking Microsoft Access and Visual basic together. Basically I have to create a interface that's allow me to input values and then the values are sent to the access to produce forms, reports. Is this possible? If so, anybody mind guide me through this? thx :)

Chris
05-10-02, 12:58 PM
Check Here (http://www.vbworld.net/)

cy
05-10-02, 02:10 PM
going to check it now, thx :)

wmain
05-30-02, 12:43 AM
What version of VB and Access?

In VB6 is is really easy to create a data designer and build forms in vb with controls on the form bound to fields in the database.

Once you create the designer you can even use a wizard to build the form. Alternatively you can draw a table to a blank form and it will populate the form with bound fields for you.

parse27
06-26-02, 12:18 PM
yes you can do that. vbserves as your frontend and access your backend. there's one catch though, you have to do a little programming in access for the forms, and then program again in vb for the frontend or the user interface.

using datacontrol in vb, the code is something like this for a vb form with a button for save and 2 textboxes for the input to be saved in access:

'CODE IN COMMAND BUTTON CLICK EVENT
data1.recordset.addnew
data1.recordset!<fieldname>=text1.text
data1.recordset!<fieldname>=text2.text
data1.recordset.update

'CODE IN FORM LOAD EVENT
data1.recordname=app.path+"\<filename of access database with .mdb extension>"
data1.recordsource="<access table name>"
data1.refresh

if you created your access database accurately enough and supplied the correct variables for the code snippet above, i think it should work.

or you could also visit this (http://www.vbexplorer.com)

hope i was of some help..:)