SOLVED:Go to random records
I have a form named frmForm1 which is linked to two tables called tblTable1 and tblTable2; tblTable2 is linked to the subform while tblTable1 is linked to the main form. I have a command button on the form, when I click it I would like for it to jump to and/or select one random record from tblTable1 and display it in the main form field in frmForm1 while simultaneously jumping to and/or selecting 3 random records from tblTable2 and displaying them in the subform field in frmForm1. The tables are not linked. Do you know what code would enable me to do this?
I have a form named frmForm1 which is linked to two tables called tblTable1 and tblTable2; tblTable2 is linked to the subform while tblTable1 is linked to the main form. I have a command button on the form, when I click it I would like for it to jump to and/or select one random record from tblTable1 and display it in the main form field in frmForm1 while simultaneously jumping to and/or selecting 3 random records from tblTable2 and displaying them in the subform field in frmForm1. The tables are not linked. Do you know what code would enable me to do this?
Last edited: