PAMPEREDBECCA
New member
- Local time
- Today, 16:15
- Joined
- Aug 6, 2000
- Messages
- 9
I am getting a type mismatch (Error 13) due to the following funciton. Can anyone enlighten me? Thanks in advance!
Public Function RandomValue() As Integer
Dim RndRecord As String
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("tableteams")
RndRecord = Int((rst.RecordCount * Rnd) + 1)
rst.Move RndRecord
RandomValue = rst.Fields(0)
End Function
Public Function RandomValue() As Integer
Dim RndRecord As String
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("tableteams")
RndRecord = Int((rst.RecordCount * Rnd) + 1)
rst.Move RndRecord
RandomValue = rst.Fields(0)
End Function