I have a search query using a list box. But for some reaosn it does not refresh or setfocus even though i have told it to. I have looked at the code and can not see any faults. I think the problem is that i have to set other parameters. I have enabled the box and also tried to unlock and lock the list box but to no avail.i am calling the two methods if i have clicked on an event. coding below
Private Sub LstUpdate()
LstComp.SetFocus
LstComp.Requery
End Sub
Private Sub Cmdsearch_Click()
If IsNull(TxtCpCode) And IsNull(txtCompnm) Then
MsgBox ("Please enter Company Code or Comapny Name"
Else
Call LstUpdate
End If
End Sub
Lstcomp= list box
TxtCpCode & TxtCompnm = txt box
Am i missing something
Private Sub LstUpdate()
LstComp.SetFocus
LstComp.Requery
End Sub
Private Sub Cmdsearch_Click()
If IsNull(TxtCpCode) And IsNull(txtCompnm) Then
MsgBox ("Please enter Company Code or Comapny Name"
Else
Call LstUpdate
End If
End Sub
Lstcomp= list box
TxtCpCode & TxtCompnm = txt box
Am i missing something