Combobox and not allowing to select other then first item

DevAccess

Registered User.
Local time
Today, 15:51
Joined
Jun 27, 2016
Messages
321
Hello

I have combobox which has been bound to query as row source and control source as table field, but it does not allow me to select item other then first in the combobox list..

I am displaying form as datasheet.

The value of the second combobox is depend on first combobox if I select A in first combobox and second combobox the values are Y, Z it allows me to select only Y in that case.

so in second comboox I have kept below as query criteria

[Forms]![frm_timesheet]![subTimesheet].[Form]![txtProjectID] in the Project ID column of the query.

Attached is query question of the second combobox [ there are two projects which are part of project3 and project2, so if we select project3 from first combobox it populates the value for those proejcts but in combobox I can select first value only.

Can anybody please help me what is wrong.
 

Attachments

  • Screenshot_1.png
    Screenshot_1.png
    17.6 KB · Views: 90
Last edited:
the values in the combos should be unique.
The 1st combo,(say cboProjs)... User picks a project, then picks a company from the cboCo.
The cboProjs AfterUpdate event will trigger when the user picks it, and this will update the next combo.


Code:
sub cboProjs_AfterEvent()
 cboCo.requery
end sub


The cboCo query (say qsCoViaProj) will reference the cboProjs in the query sql
Select * from tCompany where [PROJ] =forms!frmMain!cboProjs

The CO combo must be refreshed (cboCo.requery action) after user picks the state so it can deliver the resulting dataset.

If there is another combo after this say cboEmps to pick employees, then the cboEmp must be refreshed after user picks cboCo.
Code:
sub cboCo_AfterEvent()
 cboEmps.requery
end sub
 
the values in the combos should be unique.
The 1st combo,(say cboProjs)... User picks a project, then picks a company from the cboCo.
The cboProjs AfterUpdate event will trigger when the user picks it, and this will update the next combo.


Code:
sub cboProjs_AfterEvent()
 cboCo.requery
end sub


The cboCo query (say qsCoViaProj) will reference the cboProjs in the query sql
Select * from tCompany where [PROJ] =forms!frmMain!cboProjs

The CO combo must be refreshed (cboCo.requery action) after user picks the state so it can deliver the resulting dataset.

If there is another combo after this say cboEmps to pick employees, then the cboEmp must be refreshed after user picks cboCo.
Code:
sub cboCo_AfterEvent()
 cboEmps.requery
end sub

Thanks but question here is not of value population of combobox the question here is I am not able to select 2nd value in the list.
 
Post a sample database.
 

Users who are viewing this thread

Back
Top Bottom