[Year 12 IT Apps] off topic VB6 problem

Jim Bunn bunn.jim.c at edumail.vic.gov.au
Thu Apr 26 13:01:29 EST 2007


Hi all,

 

I'm trying to create a random phrase generator using Visual Basic 6 and am
stumped. I can make a simple one by creating a string variable for each
word, and then print random phrases with this simple code:

 

For phrase = 1 To 5

    x = Int(5 * Rnd(1) + 1)

    y = Int(5 * Rnd(1) + 1)

    z = Int(5 * Rnd(1) + 1)

    Print adj1(x); " "; adj2(y); " "; noun(z)

    Next phrase

 

What I want to be able to do is store the words in a database and use the
recordset command to generate a phrase. I also want to be able to edit (add
to and delete) words from the database fields. 

 

Anyone able to help?

 

Thanks,

Jim

 

 

 

 

Jim Bunn
CCNA CCAI ITE1
Technology Coordinator
Hampton Park Secondary College
Victoria  Australia

8795 9400

bunn.jim.c at edumail.vic.gov.au 

 


Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/itapps/attachments/20070426/06e763bc/attachment.html


More information about the itapps mailing list