ComboBox with Disappearing contents

  • Thread starter Thread starter Kevin K
  • Start date Start date
K

Kevin K

Originally posted to microsoft.public.access.forms yesterday:

Greetings to one and all, can someone please give me a steer in the right
direction with the following:

I have an MS Access 2000 form which uses 2 text boxes and three combo boxes
to derive the selection criteria used to return the rows on the form. This
all works nicely unless there are no records for the current combination of
criteria then the content of two combo boxes (which have a query rowsorce)
are no longer visible, the 2 text boxes and the combo with a list rowsource
are fine, any ideas?

I believe that the content in the ComboBox is still there together with the
selection list but it does not display a selection even after update??

Thanks in Anticipation.


Kevin
 
Rob thanks for the reply and apologies for the delayed response,

The first combo box uses a union query against a 2 local tables, and the
second again uses a union query but returns two fields from a query against
a linked SQL table.

Row Source 1:



SELECT [QryLandlordUNION].[Append_field] FROM [QryLandlordUNION]



QryLandlordUnion:



SELECT [Append_field] from [TblAppendField] where [Append_Field] <>"none"



UNION select [RPTgrp] from [TblLandlordGrp];



The query Adds "All" to the list of Report Groups (RPTgrp) from the Landlord
group table which is a local Jet Table.



Row Source 2:



SELECT qryPriorityUnion.Code, qryPriorityUnion.DESN FROM qryPriorityUnion;



QryPriorityUnion



Select "ALL" as Code, [Append_field] as DESN from [TblAppendField] where
[Append_Field] <>"none"

UNION SELECT dbo_cmpgencd.code_id, dbo_cmpgencd.desn

FROM dbo_cmpgencd

WHERE (((dbo_cmpgencd.category_id)="priority") AND
((dbo_cmpgencd.mod_id)="hsg"));



Again this adds an "All" row to the records returned from a linked SQL
table.



As I stated in the original post - the problem only occurs when the
selections from the Combos and text boxes return no rows, if this occurs
then the two combos with query based rowsources have a pick list but if any
thing is selected then that selection is not displayed.



Very Odd.



Thanks



Kevin
 
Both of these combos are unbound?


Kevin K said:
Rob thanks for the reply and apologies for the delayed response,

The first combo box uses a union query against a 2 local tables, and the
second again uses a union query but returns two fields from a query against
a linked SQL table.

Row Source 1:



SELECT [QryLandlordUNION].[Append_field] FROM [QryLandlordUNION]



QryLandlordUnion:



SELECT [Append_field] from [TblAppendField] where [Append_Field] <>"none"



UNION select [RPTgrp] from [TblLandlordGrp];



The query Adds "All" to the list of Report Groups (RPTgrp) from the Landlord
group table which is a local Jet Table.



Row Source 2:



SELECT qryPriorityUnion.Code, qryPriorityUnion.DESN FROM qryPriorityUnion;



QryPriorityUnion



Select "ALL" as Code, [Append_field] as DESN from [TblAppendField] where
[Append_Field] <>"none"

UNION SELECT dbo_cmpgencd.code_id, dbo_cmpgencd.desn

FROM dbo_cmpgencd

WHERE (((dbo_cmpgencd.category_id)="priority") AND
((dbo_cmpgencd.mod_id)="hsg"));



Again this adds an "All" row to the records returned from a linked SQL
table.



As I stated in the original post - the problem only occurs when the
selections from the Combos and text boxes return no rows, if this occurs
then the two combos with query based rowsources have a pick list but if any
thing is selected then that selection is not displayed.



Very Odd.



Thanks



Kevin




Rob Oldfield said:
What are the row sources of the two combos? What does the SQL look like?


combination
of
 
Correct, all of the combo and text boxes are unbound. On further inspection
the text boxes which contain dates and are populated by a calander pop up
also have a problem:-

If there are no records and you update the dates via the calendar controls
then this change is not reflected in the display of the text boxes but the
value is changed if you view it in the intermediate window...

The combo box with a list rowsource is fine...

Thanks


K.




Rob Oldfield said:
Both of these combos are unbound?


Kevin K said:
Rob thanks for the reply and apologies for the delayed response,

The first combo box uses a union query against a 2 local tables, and the
second again uses a union query but returns two fields from a query against
a linked SQL table.

Row Source 1:



SELECT [QryLandlordUNION].[Append_field] FROM [QryLandlordUNION]



QryLandlordUnion:



SELECT [Append_field] from [TblAppendField] where [Append_Field] <>"none"



UNION select [RPTgrp] from [TblLandlordGrp];



The query Adds "All" to the list of Report Groups (RPTgrp) from the Landlord
group table which is a local Jet Table.



Row Source 2:



SELECT qryPriorityUnion.Code, qryPriorityUnion.DESN FROM
qryPriorityUnion;



QryPriorityUnion



Select "ALL" as Code, [Append_field] as DESN from [TblAppendField] where
[Append_Field] <>"none"

UNION SELECT dbo_cmpgencd.code_id, dbo_cmpgencd.desn

FROM dbo_cmpgencd

WHERE (((dbo_cmpgencd.category_id)="priority") AND
((dbo_cmpgencd.mod_id)="hsg"));



Again this adds an "All" row to the records returned from a linked SQL
table.



As I stated in the original post - the problem only occurs when the
selections from the Combos and text boxes return no rows, if this occurs
then the two combos with query based rowsources have a pick list but if any
thing is selected then that selection is not displayed.



Very Odd.



Thanks



Kevin




Rob Oldfield said:
What are the row sources of the two combos? What does the SQL look like?


Originally posted to microsoft.public.access.forms yesterday:

Greetings to one and all, can someone please give me a steer in the right
direction with the following:

I have an MS Access 2000 form which uses 2 text boxes and three combo
boxes
to derive the selection criteria used to return the rows on the form.
This
all works nicely unless there are no records for the current combination
of
criteria then the content of two combo boxes (which have a query
rowsorce)
are no longer visible, the 2 text boxes and the combo with a list
rowsource
are fine, any ideas?

I believe that the content in the ComboBox is still there together
with
the
selection list but it does not display a selection even after update??

Thanks in Anticipation.


Kevin
 
I've just set up a simple of what you describe here - just based on the
local table combo - and it works fine. So that's no help. A couple of
things you could try...

Simplify the form by removing the filtering controls to try and see which
one of them is causing the problem.

....that would be if you were very determined to figure out why it's not
working, if you're more interested in getting a working form then I'd go
for....

Take the filtering controls and put them onto a subform within the main
form.

Though I've just had another thought...do you have the form set with
AllowAdditions switched off? Might also be playing with the LimitToList
property of the combo as well.


Kevin K said:
Correct, all of the combo and text boxes are unbound. On further inspection
the text boxes which contain dates and are populated by a calander pop up
also have a problem:-

If there are no records and you update the dates via the calendar controls
then this change is not reflected in the display of the text boxes but the
value is changed if you view it in the intermediate window...

The combo box with a list rowsource is fine...

Thanks


K.




Rob Oldfield said:
Both of these combos are unbound?


Kevin K said:
Rob thanks for the reply and apologies for the delayed response,

The first combo box uses a union query against a 2 local tables, and the
second again uses a union query but returns two fields from a query against
a linked SQL table.

Row Source 1:



SELECT [QryLandlordUNION].[Append_field] FROM [QryLandlordUNION]



QryLandlordUnion:



SELECT [Append_field] from [TblAppendField] where [Append_Field]
UNION select [RPTgrp] from [TblLandlordGrp];



The query Adds "All" to the list of Report Groups (RPTgrp) from the Landlord
group table which is a local Jet Table.



Row Source 2:



SELECT qryPriorityUnion.Code, qryPriorityUnion.DESN FROM
qryPriorityUnion;



QryPriorityUnion



Select "ALL" as Code, [Append_field] as DESN from [TblAppendField] where
[Append_Field] <>"none"

UNION SELECT dbo_cmpgencd.code_id, dbo_cmpgencd.desn

FROM dbo_cmpgencd

WHERE (((dbo_cmpgencd.category_id)="priority") AND
((dbo_cmpgencd.mod_id)="hsg"));



Again this adds an "All" row to the records returned from a linked SQL
table.



As I stated in the original post - the problem only occurs when the
selections from the Combos and text boxes return no rows, if this occurs
then the two combos with query based rowsources have a pick list but if any
thing is selected then that selection is not displayed.



Very Odd.



Thanks



Kevin




What are the row sources of the two combos? What does the SQL look like?


Originally posted to microsoft.public.access.forms yesterday:

Greetings to one and all, can someone please give me a steer in the right
direction with the following:

I have an MS Access 2000 form which uses 2 text boxes and three combo
boxes
to derive the selection criteria used to return the rows on the form.
This
all works nicely unless there are no records for the current combination
of
criteria then the content of two combo boxes (which have a query
rowsorce)
are no longer visible, the 2 text boxes and the combo with a list
rowsource
are fine, any ideas?

I believe that the content in the ComboBox is still there together
with
the
selection list but it does not display a selection even after update??

Thanks in Anticipation.


Kevin
 
Back
Top