Access VBA random value from combobox -


i have combobox of client codes links table - clientt.

when click button randomcmd random client code appear in combobox.

my thought use vba code find maximum number of clients in clientt, rnd function pick number between max , 0, convert number value list.

i can't find similar code use. have far number generates randomly.

private sub randomcmd_click()     clientcodecmb = int(999 * rnd) + 1 end sub 

please help.

if customer id first column of combobox , bound column, do:

private sub randomcmd_click()      dim maxcustomerid = 1000 ' adjust needed.      me!clientcodecmb.value = int((maxcustomerid + 1) * rnd  end sub 

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -