How do i extract information from Access to Visual Basic?

Letty

New member
Hey guys,
Reasonably new to Visual Basic programming and i am trying to make the game 'hangman' and i am having some trouble with extracting data from Access

My method for extraction at the moment is;
I am generating a random number through visual basic and it generates a number then i want to match it to a database with 500 words in it and then extract the word and display it.

How would i go about doing so?
I have tried
Dim rndnumber As Random ' Just delcaring my random number
Dim wordid As String ' This will be used to extract a word from the database with the item
' id of the number generated
Dim id As Integer
Dim Word As String ' This is the word in the database, The table is called Word
rndnumber = New Random
wordid = rndnumber.Next(1, 500)
If wordid = ID Then
TextBox1.Text = Word
End If
How exactly would i do that?
Record number is something new to me..
My vb knowledge is.. Very.. Basic!
 
Back
Top