I've moved my Database connection string into my app.config - however its causing a null exception error when i use it

App.Config
vb Code:
  1. <connectionStrings>
  2.       <add name="MyData" connectionString="Provider=Microsoft.Jet.Oledb.4.0;Data Source=MyData.mdb;Jet OLEDB:Database Password=123456789"
  3.     providerName="System.Data.OleDb" />
  4.     </connectionStrings>

I am trying to connect to it using
vb Code:
  1. Dim con6 As New OleDbConnection(ConfigurationManager.ConnectionStrings("MyData").ConnectionString)

But that crashes with a null exception error in the JIT debugger "object reference not set to an instance of an object"

However if i move the connection string to a global module class called "Strings"
vb Code:
  1. 'db connection
  2.     Friend DBConnectstrings = "Provider=Microsoft.Jet.Oledb.4.0;Data Source=MyData.mdb;Jet OLEDB:Database Password=123456789"

and call it using
vb Code:
  1. Dim con6 As New OleDbConnection(Strings.DBConnectstrings)

It works fine

I've added the reference systems.configuration to my application
And i've added 'imports system.configuration'

Any idea what i'm doing wrong?