Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Warwick, Warwickshire, England
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm just dipping my toe into Microsoft Visual Basic 2010 Express after a number of years with Access 2003 - no expert, but I get by.

    I was looking for some bigger samples of code - something like the NorthWind example which comes with Access - that show how to design / program Visual Basic applications to link to an Access database. NorthWind was useful in that it showed lots of different techniques with the code behind it. I don't suppose anyone has re-written it using Visual Basic?

    John

  2. #2
    Star Lounger
    Join Date
    Mar 2010
    Location
    Winston-Salem, NC USA
    Posts
    65
    Thanks
    12
    Thanked 4 Times in 4 Posts
    John,

    See if this tutorial is of any help. I believe it uses the Northwind database;

    http://www.techotopia.com/index.php/...g_Visual_Basic
    Do your part!!! Report SPAM to http://www.spamcop.net/

  3. #3
    2 Star Lounger
    Join Date
    Dec 2009
    Location
    Manchester, United Kingdom
    Posts
    116
    Thanks
    8
    Thanked 17 Times in 16 Posts
    Hi John

    I'm doing pretty much exactly the same thing, but I use SQL Server express as the database because I'm a cheapskate and don't want to pay Bill for a copy of Access on my new PC. Experience to date is that once you've set up the data connection the VB stuff is probably identical whatever database you use. I found a big collection of Microsoft video tutorials on linking VB forms to data:

    http://msdn.microsoft.com/en-gb/vbasic/ff718212

    I'd like to get to know Beth Massi, she is very calm and clear and I'm sure with her at my side I'd never get stuck!

    Those turorials were an enormous help in the early stages, and I still refer to them when I forget how something works. Although they relate to VS2005, things have hardly changed in 2010. For other things, bookmark various sites in MSDN. There's lots of sample code, mostly using Adventureworks but some using Northwind. I particularly use the documentation for the system.windows.forms namespace in .Net Framework 4:

    http://msdn.microsoft.com/en-us/library/k50ex0x9.aspx

    and then Visual Basic developer reference:

    http://msdn.microsoft.com/library/2x7h1hfk

    What I can definitely tell you is that VS2010 is a shock to the system after Access 2003 VBA. On the good side there's a huge amount of drag and drop functionality in the IDE which saves a ton of code. The Intellisense on VB is far better than VBA and during debugging VS will sometimes even fix the code for you. On the downside, many things that were a complete piece of cake in Access are a pain in the bum in VB. For example, turning a textbox into a combobox, one click in Access, takes about 5 minutes in VB!

    If you used good naming practices in Access you'll find VB rewards you. If not, prepare for some problems. Although I like to see myself as a professional coder I slip into rubbish naming sometimes, so when my project used a table called "Events" VB went bananas. It tried to create a property "mytableadapter.Events" and BOOM! There's already a built in Events property which enumerates handles events. Renaming the table to tblEvents took days, in fact I ended up deleting a number of forms and recreating them rather than dig through all the table adapters, datasets, binding sources etc.

    Good luck

    Ian

  4. #4
    2 Star Lounger
    Join Date
    Feb 2003
    Location
    Warwick, Warwickshire, England
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks both for your help, encouragement - and warnings. I guess there is never an ideal - Access 2003 is great for some things, VB will, I'm sure be good in other ways. Progress is never in a straight line (certainly not forwards). It will take a while to switch, and I've no doubt I'll stay with Access 2003 for much of what I do, but it would be useful to use VB for some, especially when I need to produce a compiled version of an application

    Regards

    John

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •