Common Cause for Combo Box Not Showing Value

R

ridgerunner

Is there a common reason for a combo box not showing any values?
Is there something wrong with the code in the RowSource, below:

cboQstPtVal
SELECT tblQuestions.QstWithPtVal, tblQuestions.QstID, tblQuestions.[DM
Category] FROM tblQuestions WHERE (((tblQuestions.[DM
Category])=forms!testsubfrmDMInspDet!cboDMCategories));

If I add "OR 'An actual category name' " that category list will show up.

cboDMCategories allows a user to pick a category and is working. I put an
AfterUpdate Event in the cboDMCategories to Requery cboQstVal, but that has
not helped.

Thanks very much
ridgerunner
 
J

Jeanette Cunningham

Hi,
there is a problem with the way you are referencing the subform.
Change
forms!testsubfrmDMInspDet!cboDMCategories
to
forms!MainFormName!NameOfSubformControl!cboDmCategories

Replace MainFormName and NameOfSubformControl with your names.
Note that the name of the subform control may be different from the name of
the form that sits inside the subform control.


Jeanette Cunningham
 
R

ridgerunner

What would it look like if the subform is not yet sitting inside a main form?

Jeanette Cunningham said:
Hi,
there is a problem with the way you are referencing the subform.
Change
forms!testsubfrmDMInspDet!cboDMCategories
to
forms!MainFormName!NameOfSubformControl!cboDmCategories

Replace MainFormName and NameOfSubformControl with your names.
Note that the name of the subform control may be different from the name of
the form that sits inside the subform control.


Jeanette Cunningham


ridgerunner said:
Is there a common reason for a combo box not showing any values?
Is there something wrong with the code in the RowSource, below:

cboQstPtVal
SELECT tblQuestions.QstWithPtVal, tblQuestions.QstID, tblQuestions.[DM
Category] FROM tblQuestions WHERE (((tblQuestions.[DM
Category])=forms!testsubfrmDMInspDet!cboDMCategories));

If I add "OR 'An actual category name' " that category list will show up.

cboDMCategories allows a user to pick a category and is working. I put an
AfterUpdate Event in the cboDMCategories to Requery cboQstVal, but that
has
not helped.

Thanks very much
ridgerunner
 
J

Jeanette Cunningham

as you had it
forms!testsubfrmDMInspDet!cboDMCategories

A few questions.
How many columns in cboDmCategories?
Which column is the foreign field for the query for cboQstVal?
How many columns in cboQstVal?
If you drop down cboQstVal, can you see any data?


Jeanette Cunningham


ridgerunner said:
What would it look like if the subform is not yet sitting inside a main
form?

Jeanette Cunningham said:
Hi,
there is a problem with the way you are referencing the subform.
Change
forms!testsubfrmDMInspDet!cboDMCategories
to
forms!MainFormName!NameOfSubformControl!cboDmCategories

Replace MainFormName and NameOfSubformControl with your names.
Note that the name of the subform control may be different from the name
of
the form that sits inside the subform control.


Jeanette Cunningham


ridgerunner said:
Is there a common reason for a combo box not showing any values?
Is there something wrong with the code in the RowSource, below:

cboQstPtVal
SELECT tblQuestions.QstWithPtVal, tblQuestions.QstID, tblQuestions.[DM
Category] FROM tblQuestions WHERE (((tblQuestions.[DM
Category])=forms!testsubfrmDMInspDet!cboDMCategories));

If I add "OR 'An actual category name' " that category list will show
up.

cboDMCategories allows a user to pick a category and is working. I put
an
AfterUpdate Event in the cboDMCategories to Requery cboQstVal, but that
has
not helped.

Thanks very much
ridgerunner
 
R

ridgerunner

If I drop down cboQstVal I do not seen any data.
3 columns are in cboDMCategories
4 columns in cboQstVal
I do not understand the question about the foreign field for the query for
cboQstVal.
The query is the same as the SELECT statement below.

I would like to ask another question. The form originally used the table
that the data would be entered into as the Record Source, before I tried
using combo boxes. Would that be different now?

Thanks for your help


Jeanette Cunningham said:
as you had it
forms!testsubfrmDMInspDet!cboDMCategories

A few questions.
How many columns in cboDmCategories?
Which column is the foreign field for the query for cboQstVal?
How many columns in cboQstVal?
If you drop down cboQstVal, can you see any data?


Jeanette Cunningham


ridgerunner said:
What would it look like if the subform is not yet sitting inside a main
form?

Jeanette Cunningham said:
Hi,
there is a problem with the way you are referencing the subform.
Change
forms!testsubfrmDMInspDet!cboDMCategories
to
forms!MainFormName!NameOfSubformControl!cboDmCategories

Replace MainFormName and NameOfSubformControl with your names.
Note that the name of the subform control may be different from the name
of
the form that sits inside the subform control.


Jeanette Cunningham


Is there a common reason for a combo box not showing any values?
Is there something wrong with the code in the RowSource, below:

cboQstPtVal
SELECT tblQuestions.QstWithPtVal, tblQuestions.QstID, tblQuestions.[DM
Category] FROM tblQuestions WHERE (((tblQuestions.[DM
Category])=forms!testsubfrmDMInspDet!cboDMCategories));

If I add "OR 'An actual category name' " that category list will show
up.

cboDMCategories allows a user to pick a category and is working. I put
an
AfterUpdate Event in the cboDMCategories to Requery cboQstVal, but that
has
not helped.

Thanks very much
ridgerunner
 
J

Jeanette Cunningham

To answer your question about the form's recordsource - using the table is
fine.
About the combo boxes.
Which column is the bound column for cboDMCategories?
Which column has DMCategories in it?

In the after update event for cboDMCategories, put this line of code
Debug.Print "DMCategory: " & Me.cboDMCategories

Open the form and select a category.
Press Ctl + G to open the immediate window.
What is the value for DMCategory in the immediate window?


Jeanette Cunningham


ridgerunner said:
If I drop down cboQstVal I do not seen any data.
3 columns are in cboDMCategories
4 columns in cboQstVal
I do not understand the question about the foreign field for the query for
cboQstVal.
The query is the same as the SELECT statement below.

I would like to ask another question. The form originally used the table
that the data would be entered into as the Record Source, before I tried
using combo boxes. Would that be different now?

Thanks for your help


Jeanette Cunningham said:
as you had it
forms!testsubfrmDMInspDet!cboDMCategories

A few questions.
How many columns in cboDmCategories?
Which column is the foreign field for the query for cboQstVal?
How many columns in cboQstVal?
If you drop down cboQstVal, can you see any data?


Jeanette Cunningham


ridgerunner said:
What would it look like if the subform is not yet sitting inside a main
form?

:

Hi,
there is a problem with the way you are referencing the subform.
Change
forms!testsubfrmDMInspDet!cboDMCategories
to
forms!MainFormName!NameOfSubformControl!cboDmCategories

Replace MainFormName and NameOfSubformControl with your names.
Note that the name of the subform control may be different from the
name
of
the form that sits inside the subform control.


Jeanette Cunningham


Is there a common reason for a combo box not showing any values?
Is there something wrong with the code in the RowSource, below:

cboQstPtVal
SELECT tblQuestions.QstWithPtVal, tblQuestions.QstID,
tblQuestions.[DM
Category] FROM tblQuestions WHERE (((tblQuestions.[DM
Category])=forms!testsubfrmDMInspDet!cboDMCategories));

If I add "OR 'An actual category name' " that category list will
show
up.

cboDMCategories allows a user to pick a category and is working. I
put
an
AfterUpdate Event in the cboDMCategories to Requery cboQstVal, but
that
has
not helped.

Thanks very much
ridgerunner
 
R

ridgerunner

If the column numbers begin with 1, otherwise adjust for -1:
The bound column for cboDMCategories is column 1 (DMCatID)
Column 2 has DMCategories in it.
The value for DMCategory in the immediate window is 1DMCategory:1'

Thanks for your help.

Jeanette Cunningham said:
To answer your question about the form's recordsource - using the table is
fine.
About the combo boxes.
Which column is the bound column for cboDMCategories?
Which column has DMCategories in it?

In the after update event for cboDMCategories, put this line of code
Debug.Print "DMCategory: " & Me.cboDMCategories

Open the form and select a category.
Press Ctl + G to open the immediate window.
What is the value for DMCategory in the immediate window?


Jeanette Cunningham


ridgerunner said:
If I drop down cboQstVal I do not seen any data.
3 columns are in cboDMCategories
4 columns in cboQstVal
I do not understand the question about the foreign field for the query for
cboQstVal.
The query is the same as the SELECT statement below.

I would like to ask another question. The form originally used the table
that the data would be entered into as the Record Source, before I tried
using combo boxes. Would that be different now?

Thanks for your help


Jeanette Cunningham said:
as you had it
forms!testsubfrmDMInspDet!cboDMCategories

A few questions.
How many columns in cboDmCategories?
Which column is the foreign field for the query for cboQstVal?
How many columns in cboQstVal?
If you drop down cboQstVal, can you see any data?


Jeanette Cunningham


What would it look like if the subform is not yet sitting inside a main
form?

:

Hi,
there is a problem with the way you are referencing the subform.
Change
forms!testsubfrmDMInspDet!cboDMCategories
to
forms!MainFormName!NameOfSubformControl!cboDmCategories

Replace MainFormName and NameOfSubformControl with your names.
Note that the name of the subform control may be different from the
name
of
the form that sits inside the subform control.


Jeanette Cunningham


Is there a common reason for a combo box not showing any values?
Is there something wrong with the code in the RowSource, below:

cboQstPtVal
SELECT tblQuestions.QstWithPtVal, tblQuestions.QstID,
tblQuestions.[DM
Category] FROM tblQuestions WHERE (((tblQuestions.[DM
Category])=forms!testsubfrmDMInspDet!cboDMCategories));

If I add "OR 'An actual category name' " that category list will
show
up.

cboDMCategories allows a user to pick a category and is working. I
put
an
AfterUpdate Event in the cboDMCategories to Requery cboQstVal, but
that
has
not helped.

Thanks very much
ridgerunner
 
R

ridgerunner

Sorry for the typo. Immediate window is 'DMCategory:1'

ridgerunner said:
If the column numbers begin with 1, otherwise adjust for -1:
The bound column for cboDMCategories is column 1 (DMCatID)
Column 2 has DMCategories in it.
The value for DMCategory in the immediate window is 1DMCategory:1'

Thanks for your help.

Jeanette Cunningham said:
To answer your question about the form's recordsource - using the table is
fine.
About the combo boxes.
Which column is the bound column for cboDMCategories?
Which column has DMCategories in it?

In the after update event for cboDMCategories, put this line of code
Debug.Print "DMCategory: " & Me.cboDMCategories

Open the form and select a category.
Press Ctl + G to open the immediate window.
What is the value for DMCategory in the immediate window?


Jeanette Cunningham


ridgerunner said:
If I drop down cboQstVal I do not seen any data.
3 columns are in cboDMCategories
4 columns in cboQstVal
I do not understand the question about the foreign field for the query for
cboQstVal.
The query is the same as the SELECT statement below.

I would like to ask another question. The form originally used the table
that the data would be entered into as the Record Source, before I tried
using combo boxes. Would that be different now?

Thanks for your help


:

as you had it
forms!testsubfrmDMInspDet!cboDMCategories

A few questions.
How many columns in cboDmCategories?
Which column is the foreign field for the query for cboQstVal?
How many columns in cboQstVal?
If you drop down cboQstVal, can you see any data?


Jeanette Cunningham


What would it look like if the subform is not yet sitting inside a main
form?

:

Hi,
there is a problem with the way you are referencing the subform.
Change
forms!testsubfrmDMInspDet!cboDMCategories
to
forms!MainFormName!NameOfSubformControl!cboDmCategories

Replace MainFormName and NameOfSubformControl with your names.
Note that the name of the subform control may be different from the
name
of
the form that sits inside the subform control.


Jeanette Cunningham


Is there a common reason for a combo box not showing any values?
Is there something wrong with the code in the RowSource, below:

cboQstPtVal
SELECT tblQuestions.QstWithPtVal, tblQuestions.QstID,
tblQuestions.[DM
Category] FROM tblQuestions WHERE (((tblQuestions.[DM
Category])=forms!testsubfrmDMInspDet!cboDMCategories));

If I add "OR 'An actual category name' " that category list will
show
up.

cboDMCategories allows a user to pick a category and is working. I
put
an
AfterUpdate Event in the cboDMCategories to Requery cboQstVal, but
that
has
not helped.

Thanks very much
ridgerunner
 
J

Jeanette Cunningham

The bound column of cboDMCategories is the column that must appear in the
where clause of the query for cboQstPtVal.

so the query for cboQstPtVal should be more like:
SELECT tblQuestions.QstWithPtVal, tblQuestions.QstID, tblQuestions.[DM
Category] FROM tblQuestions WHERE (((tblQuestions.[DM
CatID])=forms!testsubfrmDMInspDet!cboDMCategories));

Note that I have replaced
FROM tblQuestions WHERE (((tblQuestions.[DM Category])=yadda, yadda, ...

with
FROM tblQuestions WHERE (((tblQuestions.[DM CatID])=yadda, yadda, ...

This assumes that the field called DM CatID actually has a space in its
name.


Jeanette Cunningham


ridgerunner said:
Sorry for the typo. Immediate window is 'DMCategory:1'

ridgerunner said:
If the column numbers begin with 1, otherwise adjust for -1:
The bound column for cboDMCategories is column 1 (DMCatID)
Column 2 has DMCategories in it.
The value for DMCategory in the immediate window is 1DMCategory:1'

Thanks for your help.

Jeanette Cunningham said:
To answer your question about the form's recordsource - using the table
is
fine.
About the combo boxes.
Which column is the bound column for cboDMCategories?
Which column has DMCategories in it?

In the after update event for cboDMCategories, put this line of code
Debug.Print "DMCategory: " & Me.cboDMCategories

Open the form and select a category.
Press Ctl + G to open the immediate window.
What is the value for DMCategory in the immediate window?


Jeanette Cunningham


If I drop down cboQstVal I do not seen any data.
3 columns are in cboDMCategories
4 columns in cboQstVal
I do not understand the question about the foreign field for the
query for
cboQstVal.
The query is the same as the SELECT statement below.

I would like to ask another question. The form originally used the
table
that the data would be entered into as the Record Source, before I
tried
using combo boxes. Would that be different now?

Thanks for your help


:

as you had it
forms!testsubfrmDMInspDet!cboDMCategories

A few questions.
How many columns in cboDmCategories?
Which column is the foreign field for the query for cboQstVal?
How many columns in cboQstVal?
If you drop down cboQstVal, can you see any data?


Jeanette Cunningham


message
What would it look like if the subform is not yet sitting inside a
main
form?

:

Hi,
there is a problem with the way you are referencing the subform.
Change
forms!testsubfrmDMInspDet!cboDMCategories
to
forms!MainFormName!NameOfSubformControl!cboDmCategories

Replace MainFormName and NameOfSubformControl with your names.
Note that the name of the subform control may be different from
the
name
of
the form that sits inside the subform control.


Jeanette Cunningham


message
Is there a common reason for a combo box not showing any
values?
Is there something wrong with the code in the RowSource, below:

cboQstPtVal
SELECT tblQuestions.QstWithPtVal, tblQuestions.QstID,
tblQuestions.[DM
Category] FROM tblQuestions WHERE (((tblQuestions.[DM
Category])=forms!testsubfrmDMInspDet!cboDMCategories));

If I add "OR 'An actual category name' " that category list
will
show
up.

cboDMCategories allows a user to pick a category and is
working. I
put
an
AfterUpdate Event in the cboDMCategories to Requery cboQstVal,
but
that
has
not helped.

Thanks very much
ridgerunner
 
R

ridgerunner

Thank you SO much. The drop down works now, but I am having another problem.
If I close the form, reopen and change a record, all the entries for
QstPtVal that have a category different from the one I am working on blank
out. How can I fix that?

Jeanette Cunningham said:
The bound column of cboDMCategories is the column that must appear in the
where clause of the query for cboQstPtVal.

so the query for cboQstPtVal should be more like:
SELECT tblQuestions.QstWithPtVal, tblQuestions.QstID, tblQuestions.[DM
Category] FROM tblQuestions WHERE (((tblQuestions.[DM
CatID])=forms!testsubfrmDMInspDet!cboDMCategories));

Note that I have replaced
FROM tblQuestions WHERE (((tblQuestions.[DM Category])=yadda, yadda, ...

with
FROM tblQuestions WHERE (((tblQuestions.[DM CatID])=yadda, yadda, ...

This assumes that the field called DM CatID actually has a space in its
name.


Jeanette Cunningham


ridgerunner said:
Sorry for the typo. Immediate window is 'DMCategory:1'

ridgerunner said:
If the column numbers begin with 1, otherwise adjust for -1:
The bound column for cboDMCategories is column 1 (DMCatID)
Column 2 has DMCategories in it.
The value for DMCategory in the immediate window is 1DMCategory:1'

Thanks for your help.

:

To answer your question about the form's recordsource - using the table
is
fine.
About the combo boxes.
Which column is the bound column for cboDMCategories?
Which column has DMCategories in it?

In the after update event for cboDMCategories, put this line of code
Debug.Print "DMCategory: " & Me.cboDMCategories

Open the form and select a category.
Press Ctl + G to open the immediate window.
What is the value for DMCategory in the immediate window?


Jeanette Cunningham


If I drop down cboQstVal I do not seen any data.
3 columns are in cboDMCategories
4 columns in cboQstVal
I do not understand the question about the foreign field for the
query for
cboQstVal.
The query is the same as the SELECT statement below.

I would like to ask another question. The form originally used the
table
that the data would be entered into as the Record Source, before I
tried
using combo boxes. Would that be different now?

Thanks for your help


:

as you had it
forms!testsubfrmDMInspDet!cboDMCategories

A few questions.
How many columns in cboDmCategories?
Which column is the foreign field for the query for cboQstVal?
How many columns in cboQstVal?
If you drop down cboQstVal, can you see any data?


Jeanette Cunningham


message
What would it look like if the subform is not yet sitting inside a
main
form?

:

Hi,
there is a problem with the way you are referencing the subform.
Change
forms!testsubfrmDMInspDet!cboDMCategories
to
forms!MainFormName!NameOfSubformControl!cboDmCategories

Replace MainFormName and NameOfSubformControl with your names.
Note that the name of the subform control may be different from
the
name
of
the form that sits inside the subform control.


Jeanette Cunningham


message
Is there a common reason for a combo box not showing any
values?
Is there something wrong with the code in the RowSource, below:

cboQstPtVal
SELECT tblQuestions.QstWithPtVal, tblQuestions.QstID,
tblQuestions.[DM
Category] FROM tblQuestions WHERE (((tblQuestions.[DM
Category])=forms!testsubfrmDMInspDet!cboDMCategories));

If I add "OR 'An actual category name' " that category list
will
show
up.

cboDMCategories allows a user to pick a category and is
working. I
put
an
AfterUpdate Event in the cboDMCategories to Requery cboQstVal,
but
that
has
not helped.

Thanks very much
ridgerunner
 
R

ridgerunner

I moved the Requery to the OnEnter Event and that seems to work better. If
this might create problems or I am just not doing this incorrectly, please
let me know.

ridgerunner said:
Thank you SO much. The drop down works now, but I am having another problem.
If I close the form, reopen and change a record, all the entries for
QstPtVal that have a category different from the one I am working on blank
out. How can I fix that?

Jeanette Cunningham said:
The bound column of cboDMCategories is the column that must appear in the
where clause of the query for cboQstPtVal.

so the query for cboQstPtVal should be more like:
SELECT tblQuestions.QstWithPtVal, tblQuestions.QstID, tblQuestions.[DM
Category] FROM tblQuestions WHERE (((tblQuestions.[DM
CatID])=forms!testsubfrmDMInspDet!cboDMCategories));

Note that I have replaced
FROM tblQuestions WHERE (((tblQuestions.[DM Category])=yadda, yadda, ...

with
FROM tblQuestions WHERE (((tblQuestions.[DM CatID])=yadda, yadda, ...

This assumes that the field called DM CatID actually has a space in its
name.


Jeanette Cunningham


ridgerunner said:
Sorry for the typo. Immediate window is 'DMCategory:1'

:

If the column numbers begin with 1, otherwise adjust for -1:
The bound column for cboDMCategories is column 1 (DMCatID)
Column 2 has DMCategories in it.
The value for DMCategory in the immediate window is 1DMCategory:1'

Thanks for your help.

:

To answer your question about the form's recordsource - using the table
is
fine.
About the combo boxes.
Which column is the bound column for cboDMCategories?
Which column has DMCategories in it?

In the after update event for cboDMCategories, put this line of code
Debug.Print "DMCategory: " & Me.cboDMCategories

Open the form and select a category.
Press Ctl + G to open the immediate window.
What is the value for DMCategory in the immediate window?


Jeanette Cunningham


If I drop down cboQstVal I do not seen any data.
3 columns are in cboDMCategories
4 columns in cboQstVal
I do not understand the question about the foreign field for the
query for
cboQstVal.
The query is the same as the SELECT statement below.

I would like to ask another question. The form originally used the
table
that the data would be entered into as the Record Source, before I
tried
using combo boxes. Would that be different now?

Thanks for your help


:

as you had it
forms!testsubfrmDMInspDet!cboDMCategories

A few questions.
How many columns in cboDmCategories?
Which column is the foreign field for the query for cboQstVal?
How many columns in cboQstVal?
If you drop down cboQstVal, can you see any data?


Jeanette Cunningham


message
What would it look like if the subform is not yet sitting inside a
main
form?

:

Hi,
there is a problem with the way you are referencing the subform.
Change
forms!testsubfrmDMInspDet!cboDMCategories
to
forms!MainFormName!NameOfSubformControl!cboDmCategories

Replace MainFormName and NameOfSubformControl with your names.
Note that the name of the subform control may be different from
the
name
of
the form that sits inside the subform control.


Jeanette Cunningham


message
Is there a common reason for a combo box not showing any
values?
Is there something wrong with the code in the RowSource, below:

cboQstPtVal
SELECT tblQuestions.QstWithPtVal, tblQuestions.QstID,
tblQuestions.[DM
Category] FROM tblQuestions WHERE (((tblQuestions.[DM
Category])=forms!testsubfrmDMInspDet!cboDMCategories));

If I add "OR 'An actual category name' " that category list
will
show
up.

cboDMCategories allows a user to pick a category and is
working. I
put
an
AfterUpdate Event in the cboDMCategories to Requery cboQstVal,
but
that
has
not helped.

Thanks very much
ridgerunner
 

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