=DLookup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have this code in a procedure.
What I want to do is to be able to use the value of ThisCardNo as the number
for the criteria in DLookup.
Is this possible ?

Thanks in anticipation.


Dim ThisCardNo As Integer ' Used to hold the Random number
Dim x As String

Randomize ' Initialize random-number generator.
ThisCardNo = Int((52 * Rnd) + 1) 'Generate a random number between 1 and 52.

' Players Card1
x = DLookup("[CardName]", "TheDeck", "[CardNo] = ThisCardNo")
 
Sorry folks, I have just found what I needed to know via an answer by Robert
Soloman.

Thanks very much :)
 
Back
Top