ComboBox with Disappearing contents

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
 
K

Kevin K

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
 
R

Rob Oldfield

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
 
K

Kevin K

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top