View Single Post
Old 12-08-2017, 09:02 AM
Daigon Ali Daigon Ali is offline
Join Date: Aug 2014
Location: London
Posts: 73

You're welcome.

I don't know about books but this site is quite useful and covers most versions of VB.
Visual Basic 2017 Tutorial - Visual Basic

I use SharpDevelop rather than VS but a few things that I soon discovered were:
  1. Brackets round all message boxes.
  2. The usual string functions Left,Right etc have to be "Microsoft.VisualBasic.Left" or you can import a reference e.g. "Imports VB = Microsoft.VisualBasic" so then you can just use "VB.Left".
  3. Syntax for a fields in an ADO recordset e.g. rs![my field] needs to be rs.Fields.Item("my field").value
  4. ADO isnull() is isDBNull()
  5. Year(Date) = Today.Year
  6. When formatting a date, the month has to be in upper case e.g. dd/MM/yy because mm donates minutes.
  7. Frame = Groupbox
  8. StatusBar = Statustrip
  9. MenuStrip instead of the menu editor.
  10. You have to save your code before you can run it even in the IDE.
  11. In a multi-select listbox, the listindex is always the first selected item.
Reply With Quote