Prev/Next Record coding

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two forms open. One form has a combo box that is unbound that
displays a list of records and controls the record that is shown in the other
form. I have coded a previous record command button and next command button
with this code.

Private Sub cmdUp_Click()
Combo0.Setfocus
Combo0.Dropdown
SendKeys "{up}" & "{enter}", False
End Sub

The down is coded the same way with 'down' instead of 'up', at first it
worked great. It would go to the previous or next record in the dropdown
box. But after a while it stopped working. It acts like it never gets to
the SendKeys part of the procedure. What would make it stop working after it
was working? I haven't changed anything.

Thank you
Glenn
 
Ok I get it. I broke one the rules by using 'SendKeys'. Is there a better
way to code it?

Thank you
Glenn
 
Back
Top