A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Common Cause for Combo Box Not Showing Value



 
 
Thread Tools Display Modes
  #11  
Old April 18th, 2008, 07:52 PM posted to microsoft.public.access.forms
ridgerunner
external usenet poster
 
Posts: 118
Default Common Cause for Combo Box Not Showing Value

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" wrote:

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" wrote:

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" wrote in message
news
Sorry for the typo. Immediate window is 'DMCategory:1'

"ridgerunner" wrote:

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" wrote:

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" wrote in message
...
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" wrote:

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" wrote in
message
...
What would it look like if the subform is not yet sitting inside a
main
form?

"Jeanette Cunningham" wrote:

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

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" wrote in
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














 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:52 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.