Select Distinct problem

I have an SQL statment SELECT DISTINCT operLastName, operFirstName, operRegion, operHourlyRate FROM operator_information; in a drop down box. And the different textboxes on the form will grab the information from the combo box and populate.

Private Sub operLastName_BeforeUpdate(Cancel As Integer)
operFirstName.Value = operLastName.Column(1)
txtRegion.Value = operLastName.Column(2)
txtHourlyRate.Value = operLastName.Column(4)
End Sub

the problem however is that if the employee ends up getting a raise and has a new hourly rate applied to him, the combo box will end up showing him twice, once for the old wage and once for the new wage....How do i eliminate this and have him only show up once? i was thinking about addind a Max(operHoulyRate) to the Select statment but it has not worked.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories