Home > Software engineering >  One of randomly in VB database data showed on the label
One of randomly in VB database data showed on the label

Time:10-15



The database has been successfully connected
Want to press the command key and
Random in a LABEL shows "words" one of the column data
How to write code?

CodePudding user response:

N=total number of records data table
I=int (RND * n + 1)
In the end, "select words from katakana where id=" & amp; I come to pick up the result

CodePudding user response:

Directly with the grid of the click event to trigger is not good? Selected first, then press the button not reinvent the wheel?

CodePudding user response:

SELECT the FROM TOP 1 word katakana ORDER BY NEWID ()
  • Related