Javindo
February 16th, 2010, 10:06 AM
Hey,
I have been a long time reader of this forum but only today have I finally had to resort to singing up and asking for help! I always see people giving very useful advice here so I am confident that you might be able to help.
Essentially, whenever my users who are logged in via a global module level variable enter a new form, their activity is "logged" in a textfile with their UserID as the name.txt and every time they visit a page it adds a new line to their log file with a number corresponding to the form they visited. For example, if they select "add a user" it will add the line "1" to their log file. Note: At the moment there is only 1 2 and 3 not 0.
I have got this far and I have got as far as creating an array which has:
Array(0) = NumberOfTimes 0 appears in the log file
Array(1) = NumberOfTimes 1 appears in the log file
etc etc
Therefore the output for this is
Msgbox(Array(0)) shows "0"
MsgBox(Array(1)) shows "4" for example and lets just say
MsgBox(Array(2)) shows "9" and
MsgBox(Array(3)) shows "1"
Therefore, finally (!) my problem is now finding which 3 are the top. I have tried various methods of sorting them but I just get "9, 4, 1, 0" rather than "2, 1, 3, 0"
If you understand I would greatly appreciate the help as I have been tearing my hair out for the past 2 days trying to do this! (By the way the end product for this is to show three links on the "welcome form" of the users 3 most visited forms)
Here is a pastebin of all the rubbish I have currently tried that hasn't worked! http://pastebin.com/f4030d95e
Again, thank you in advance for ANY help!
I have been a long time reader of this forum but only today have I finally had to resort to singing up and asking for help! I always see people giving very useful advice here so I am confident that you might be able to help.
Essentially, whenever my users who are logged in via a global module level variable enter a new form, their activity is "logged" in a textfile with their UserID as the name.txt and every time they visit a page it adds a new line to their log file with a number corresponding to the form they visited. For example, if they select "add a user" it will add the line "1" to their log file. Note: At the moment there is only 1 2 and 3 not 0.
I have got this far and I have got as far as creating an array which has:
Array(0) = NumberOfTimes 0 appears in the log file
Array(1) = NumberOfTimes 1 appears in the log file
etc etc
Therefore the output for this is
Msgbox(Array(0)) shows "0"
MsgBox(Array(1)) shows "4" for example and lets just say
MsgBox(Array(2)) shows "9" and
MsgBox(Array(3)) shows "1"
Therefore, finally (!) my problem is now finding which 3 are the top. I have tried various methods of sorting them but I just get "9, 4, 1, 0" rather than "2, 1, 3, 0"
If you understand I would greatly appreciate the help as I have been tearing my hair out for the past 2 days trying to do this! (By the way the end product for this is to show three links on the "welcome form" of the users 3 most visited forms)
Here is a pastebin of all the rubbish I have currently tried that hasn't worked! http://pastebin.com/f4030d95e
Again, thank you in advance for ANY help!