i need VB and Access help!

Discussion in 'Software' started by cherrymse, Oct 20, 2005.

  1. cherrymse

    cherrymse Private E-2

    Ok here's my problem. I've got a small project which involves me creating a questionnaire/survey which has to be linked to a database storing peoples' opinions. I've decided to use Visual Basic and Access.

    now my problem is i've never programmed with databases and i dont quite know how to link my questionnaire forms with the access database. At this stage i have created two tables in my database, now how do i mash it all 2gether with VB.
    Oh and please i need to know wat Recordset, Recordsource means and all the other terms.

    (i hope i dont sound daft! :) :p ;) )
    thanks
     
  2. Wookie

    Wookie Sergeant Major

    Well before I point you in the direction you need to go, what version of vb are you using? VB6 or .net?
     
  3. Kodo

    Kodo SNATCHSQUATCH

  4. cherrymse

    cherrymse Private E-2

    Oh c'mon Kodo, you can at least give me a few pointers. :) ;)

    Im using VB6, Wookie. :) ;)
    thanks
     
  5. Kodo

    Kodo SNATCHSQUATCH

    Serious..there is too much.. I can spend all day writing pointers.
    You need to get some more background first before I can take the time to make code suggestions.
     
  6. Wookie

    Wookie Sergeant Major

    The basics are your going to need to include a reference to adodb in your project, create a connection object and a recordset object.

    Your connection object is going to have to point to the access database you are using with a connection string like

    Code:
    Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\My.mdb;Mode=ReadWrite|Share Deny None;Persist Security Info=False"
    

    then your recordset has to .open yourconnection object, along with a SQL query,

    such as SELECT * FROM MYTABLE;

    You will then get records returned (or maybe not)

    which u can access using recordset.fields("fieldname").value or various other ways.

    Check out this tutorial

    http://www.vbexplorer.com/VBExplorer/vb_feature/june2000/Database_Beginner_ADO_DAO.asp
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds