comboBox.text=Error

fredElliotRules

Registered User.
Local time
Today, 22:58
Joined
Nov 3, 2006
Messages
15
Hi,


I've got the following code.


Code:
If Employed.Value = True Then

    Combo36.SetFocus
    Combo36.RowSource = "Select * from [employmentBy] where [employmentBy] NOT IN ('[Ignore]','No Employment')"
    'Combo36.Text = Combo36.ItemData(0)
    

    cmbJobTitle.SetFocus
    cmbJobTitle.RowSource = "Select * from [jobTitles] where [Job Titles] <> 'No Job'"
    'cmbJobTitle.Text = cmbJobTitle.ItemData(cmbJobTitle.ListIndex)
    
    
    cmbJobLocation.SetFocus
    cmbJobLocation.RowSource = "Select * from [townLocations] where [townLocations] <> 'No Location'"
    
    
Else
    
    
   
    Combo36.SetFocus
     Combo36.RowSource = "Select * from [employmentBy] where [employmentBy] = 'No Employment'"
    'Combo36.Text = "No Employment"
    

  
    
    cmbJobTitle.SetFocus
    cmbJobTitle.RowSource = "Select * from [jobTitles] where [Job Titles] = 'No Job'"
    'cmbJobTitle.Text = "No Job"
   
  cmbJobLocation.SetFocus
    cmbJobLocation.RowSource = "Select * from [townLocations] where [townLocations] = 'No Location'"

End If

Combo36.Requery
cmbJobTitle.Requery

This code simple alters the values in a combo box when a person is unemployed or not. However I keep trying to change the value in the combo box.

Code:
combo36.text="Something"
combo36.seltext="Something"

And it produces some error about not being able to save so it wont ammend the combo box, does anyone have any ideas how to get rid of this annoyance.
 

Users who are viewing this thread

Back
Top Bottom