S
Stu_J
Guest
Hi, I am new to this forum. I have been using Access for some time, but mostly I am self-taught.
A colleague of mine created a phone book database, and I refined the user form for this using VBA code.
The form orders the recordset into alphabetical order (of the surnames) every time it opens.
The user can type in the surname they want, and the form will automatically update with the information for that person. Because of problems that occured after this, I have also replaced the record navigation buttons with my own VB code.
Private Sub Next_Item_Click()
DoCmd.GoToRecord , , acNext
Combo25.SetFocus
If Combo25.Text = Surname Then GoTo Skip_Command
Combo25.Text = Surname
End Sub
Private Sub Prev_Item_Click()
DoCmd.GoToRecord , , acPrevious
Combo25.SetFocus
If Combo25.Text = Surname Then GoTo Skip_Command
Combo25.Text = Surname
End Sub
Unfortunately, the system has one small bug in it. There are two people with the same surname in the phone list, and when the user cycles backwards through the list, it skips one of those two people.
Can anyone suggest anything? Or will we just have to fire one these awkward people?
(ps I am using Access97 for the record)
A colleague of mine created a phone book database, and I refined the user form for this using VBA code.
The form orders the recordset into alphabetical order (of the surnames) every time it opens.
The user can type in the surname they want, and the form will automatically update with the information for that person. Because of problems that occured after this, I have also replaced the record navigation buttons with my own VB code.
Private Sub Next_Item_Click()
DoCmd.GoToRecord , , acNext
Combo25.SetFocus
If Combo25.Text = Surname Then GoTo Skip_Command
Combo25.Text = Surname
End Sub
Private Sub Prev_Item_Click()
DoCmd.GoToRecord , , acPrevious
Combo25.SetFocus
If Combo25.Text = Surname Then GoTo Skip_Command
Combo25.Text = Surname
End Sub
Unfortunately, the system has one small bug in it. There are two people with the same surname in the phone list, and when the user cycles backwards through the list, it skips one of those two people.
Can anyone suggest anything? Or will we just have to fire one these awkward people?
(ps I am using Access97 for the record)