spacemunkee
New member
- Local time
- Today, 13:19
- Joined
- Mar 5, 2007
- Messages
- 6
Hi all first post 
I have a table which contains technical information about subcontractors, including their performance (good,bad etc) which is chosen using a combo box when adding new records.
I have decided to create a search form that contains a combo box with the same performance values within so that the user can basically search through subcontractors which have the same performance level.
In the search form i have placed the combo box with the name cboSearch
Row source: SELECT [tblSubcontractors].[Performance] FROM [tblSubcontractors] GROUP BY [Performance]
The on change command uses the following event:
Private Sub cboSearch_Change()
DoCmd.OpenQuery "qryPerformance"
Me.cbosearch = ""
End Sub
I have produced a query (qryPerformance) which contains all of the field from the tblSubcontractors with the criteria [Forms]![frmPerformance]![cboSearch]
I then tested the query from the search form using the combo box which produced the desired results in a datasheet. I have used the sub form wizard to place the qryPerformance in to the search form. However the problem that i am having is when i open the search form and then select a value from the combo box the results pop up as a data sheet (in the background, not in the sub form) as they did before and the subform is left unupdated.
I cant see what im missing but im sure its going to be obvious.. i just want the results of the query to be as a subform in the search form, which i can then browse through.
Thanks for any help
I have a table which contains technical information about subcontractors, including their performance (good,bad etc) which is chosen using a combo box when adding new records.
I have decided to create a search form that contains a combo box with the same performance values within so that the user can basically search through subcontractors which have the same performance level.
In the search form i have placed the combo box with the name cboSearch
Row source: SELECT [tblSubcontractors].[Performance] FROM [tblSubcontractors] GROUP BY [Performance]
The on change command uses the following event:
Private Sub cboSearch_Change()
DoCmd.OpenQuery "qryPerformance"
Me.cbosearch = ""
End Sub
I have produced a query (qryPerformance) which contains all of the field from the tblSubcontractors with the criteria [Forms]![frmPerformance]![cboSearch]
I then tested the query from the search form using the combo box which produced the desired results in a datasheet. I have used the sub form wizard to place the qryPerformance in to the search form. However the problem that i am having is when i open the search form and then select a value from the combo box the results pop up as a data sheet (in the background, not in the sub form) as they did before and the subform is left unupdated.
I cant see what im missing but im sure its going to be obvious.. i just want the results of the query to be as a subform in the search form, which i can then browse through.
Thanks for any help