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")
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")