Access Query/Module Transfer Problems to FrontPage

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

Guest

Hello,

In Access 2003, I wrote a query to retrieve a random record from my
database, along with a Randomize module to initialize the random-number
generator. It works fine in Access. When I import the .mdb file to
FrontPage 2003, the database results act as though there is no Randomize
module. The query is:

SELECT TOP 1 *
FROM table
ORDER BY RndNum([keyfield])
(Thanks to MVP Marsh)

The module is:
Public Function RndNum(vIgnore As Variant) As Double
Static bRnd As Boolean
If Not bRnd Then
bRnd = True
Randomize
End If
RndNum = Rnd()
End Function

(Thanks to MVP John W. Vinson)

I would appreciate any help anyone can give me to resolve this issue.
 
You are going to have to do the export in ms-access, as obviously any vb
code you run from a query requires that you be running ms-access.

So, you might be best to export to a text file..and then give that to the
web server. Another possible would be to open the mdb file, and in the asp
(vb.script) code on the web side...do the random command.
 
Back
Top