Prev/Next Record coding

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
 
G

Guest

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

Thank you
Glenn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top