Access Query/Module Transfer Problems to FrontPage

M

mobilecs

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.
 
A

Albert D. Kallal

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top