B
Barry G. Sumpter
Hi all,
I'm using the form generated in the Switchboard manager.
I've added a few combo boxes for selection criteria:
cboUser
cboCompany
cboProject
cboTask
I've a very simple report which just shows what user is assigned to what
company, project, task.
At the top of the report I want to show the selection criteria.
To build the selection criteria text I execute a routine after every
cboXXXX_Change
The problem:
To retrieve the text from each combo box I have to use:
cboxxx.setfocus
The setfocus causes a lot of flickering on the form.
as in:
Sub BuildReportCriteriaDisplays()
Dim strLabels As String
Dim strData As String
txtUser.SetFocus
If Trim(txtUser.Text) <> "" Then
strLabels = "User :"
strData = txtUser.Text
End If
cboCompany.SetFocus
If cboCompany.Value <> "" Then
If Trim(strLabels) <> "" Then
strLabels = strLabels & vbCrLf & "Company :"
strData = strData & vbCrLf & cboCompany.Text
Else
strLabels = "Company :"
strData = cboCompany.Text
End If
End If
etc....
Is there another way to reference properties a control on a form?
Thanks,
Barry G. Sumpter
I'm using the form generated in the Switchboard manager.
I've added a few combo boxes for selection criteria:
cboUser
cboCompany
cboProject
cboTask
I've a very simple report which just shows what user is assigned to what
company, project, task.
At the top of the report I want to show the selection criteria.
To build the selection criteria text I execute a routine after every
cboXXXX_Change
The problem:
To retrieve the text from each combo box I have to use:
cboxxx.setfocus
The setfocus causes a lot of flickering on the form.
as in:
Sub BuildReportCriteriaDisplays()
Dim strLabels As String
Dim strData As String
txtUser.SetFocus
If Trim(txtUser.Text) <> "" Then
strLabels = "User :"
strData = txtUser.Text
End If
cboCompany.SetFocus
If cboCompany.Value <> "" Then
If Trim(strLabels) <> "" Then
strLabels = strLabels & vbCrLf & "Company :"
strData = strData & vbCrLf & cboCompany.Text
Else
strLabels = "Company :"
strData = cboCompany.Text
End If
End If
etc....
Is there another way to reference properties a control on a form?
Thanks,
Barry G. Sumpter