Hi guys,
Been working on this IT Helpdesk tool that I have to adapt since its functionality is limited at the moment. The whole issue here is about a listbox called listboxFindCall.
There is only one form here. It displays on top a listbox with all the active calls that have to be solved, which shows 5 colums (priority, callnr, name, date, IT employee). You can click on the call and it will be displayed below the listbox on the same form, this was done with the command:
Me.RecordsetClone.FindFirst "[Call_Id] = " & Me![listboxFindCall]
Me.Bookmark = Me.RecordsetClone.Bookmark
That all works fine. I have also built in a search option such that you can search the listbox as you type, on name, call number or IT employee. That also works fine.
When you go to a call there are 2 comboboxes which are relevant here.
ComboStatus (call is active or solved, in case of solved it is (hopefully) not displayed in the listbox) and ComboITEmployee.
When you make a new record (or call) everything seems to work ok. You select an IT employee and status is automaticaly set to active. When you then click in the listbox it automatically adds the record to the listbox. Both comboboxes have after update code which requeries the listbox, I'll show in a minute.
The problem really is when you want to change something from there on. When you go to a call and want to change the IT employee it doesn't change it in the listbox and when you then go back to the record it also is not changed there or it is changed in the prior record?!? Also when you close a call (put status on solved) it doesn't close it, but closes sometimes the prior record or nothing at all or jumps to a different record.
So here's the code I'm using.
For comboITemployee:
Private Sub ComboITEmployee_AfterUpdate()
Me.listboxFindCall.Requery
End Sub
For the status combobox, there is also a part that registers the date when the call is solved.:
Private Sub ComboStatus_AfterUpdate()
On Error Resume Next
Me.listboxFindCall.Requery
If Me.ComboStatus = "solved" Then
Me.Date.SetFocus
Me.Date.Locked = False
Me.Date = Now()
Me.Date.Locked = True
Me.ComboStatus.SetFocus
Else
Me.Date.SetFocus
Me.Date = ""
Me.Date.Locked = True
Me.ComboStatus.SetFocus
End If
End Sub
Hopefully you can give me some advice, as the database tool as it is now is useless as you cannot close calls and especially if it writes data to the wrong record. Your advice will be highly appreciated.
Regards, Urco
Been working on this IT Helpdesk tool that I have to adapt since its functionality is limited at the moment. The whole issue here is about a listbox called listboxFindCall.
There is only one form here. It displays on top a listbox with all the active calls that have to be solved, which shows 5 colums (priority, callnr, name, date, IT employee). You can click on the call and it will be displayed below the listbox on the same form, this was done with the command:
Me.RecordsetClone.FindFirst "[Call_Id] = " & Me![listboxFindCall]
Me.Bookmark = Me.RecordsetClone.Bookmark
That all works fine. I have also built in a search option such that you can search the listbox as you type, on name, call number or IT employee. That also works fine.
When you go to a call there are 2 comboboxes which are relevant here.
ComboStatus (call is active or solved, in case of solved it is (hopefully) not displayed in the listbox) and ComboITEmployee.
When you make a new record (or call) everything seems to work ok. You select an IT employee and status is automaticaly set to active. When you then click in the listbox it automatically adds the record to the listbox. Both comboboxes have after update code which requeries the listbox, I'll show in a minute.
The problem really is when you want to change something from there on. When you go to a call and want to change the IT employee it doesn't change it in the listbox and when you then go back to the record it also is not changed there or it is changed in the prior record?!? Also when you close a call (put status on solved) it doesn't close it, but closes sometimes the prior record or nothing at all or jumps to a different record.
So here's the code I'm using.
For comboITemployee:
Private Sub ComboITEmployee_AfterUpdate()
Me.listboxFindCall.Requery
End Sub
For the status combobox, there is also a part that registers the date when the call is solved.:
Private Sub ComboStatus_AfterUpdate()
On Error Resume Next
Me.listboxFindCall.Requery
If Me.ComboStatus = "solved" Then
Me.Date.SetFocus
Me.Date.Locked = False
Me.Date = Now()
Me.Date.Locked = True
Me.ComboStatus.SetFocus
Else
Me.Date.SetFocus
Me.Date = ""
Me.Date.Locked = True
Me.ComboStatus.SetFocus
End If
End Sub
Hopefully you can give me some advice, as the database tool as it is now is useless as you cannot close calls and especially if it writes data to the wrong record. Your advice will be highly appreciated.
Regards, Urco