I have 25 command buttons with a simple "DoCmd.SearchForRecord" single line of code on each.
I would also like add to following code to each of the 25 buttons
Dim MySQL As String
MySQL = "SELECT fCONT_MOST.cID, fCONT_MOST.SORTby, fCONT_MOST.cNAME, fCONT_MOST.ck_45 FROM fCONT_MOST " & _
"WHERE (((fCONT_MOST.ck_45)=False)); "
ComboFIND1.RowSource = MySQL
Me.RecordSource = "fCONT_MOST"
LabelFILTERname.Caption = "MOST RECORDS"
Pasting it in 25 times would work fine but would bloat the code for the form.
Could the extra code be reduced to a single line or two using some type of user function?