Skip to content

Instantly share code, notes, and snippets.

@facebookegypt
Created March 10, 2013 17:40
Show Gist options
  • Save facebookegypt/5129595 to your computer and use it in GitHub Desktop.
Save facebookegypt/5129595 to your computer and use it in GitHub Desktop.
Private Sub Form_Load()
'Apply Graphics.
Form_Paint
'2-Connect to Database
If CN.State = 1 Then CN.Close
CN.Open ("Provider = Microsoft.Jet.OleDB.4.0 ; Data Source =" & App.Path & "\MyBook.Mdb")
'3)Connect Table Phones
If RS.State = 1 Then RS.Close
RS.CursorLocation = adUseClient
RS.Open ("Select * From Phones"), CN, adOpenDynamic, adLockOptimistic
'5)MyPic, if no other photo has been picked then this is the default picture.
PicNm = App.Path & "/Phone1.Jpg"
Timg.Picture = LoadPicture(PicNm)
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment