Subform Combo box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform which has a combo box in which data is entered as a project
number. Currently, this works as intended.
Once a project is completed, I add a close date to the Projects table.
I wish to be able to only see Active project numbers during data entry and
at the same time, not affect those project numbers which were data entered
prior to the close date. I have attempted this in the past. It worked as far
as only seeing active projects. But, those projects that were inactive (but
active prior to the end date) were "blanked out". I was able see them again
once I trashed the idea.
Can someone offer any ideas as to how I may be able to accomplish this idea ?
I will be happy to supply further info if needed.

thank you VERY MUCH in advance.

John
 
What you are seeing is a common side effect of trying to synchronize
comboboxes on continuous form. When you use this technique on a continuous
form you get strange looking results because though you see multiple rows,
there is actually only a single combo box control with a single rowsource.
Whatever you do to that control will be apparent in all rows. When you
restrict the values in the combo box by some other value (Category in your
case) and you have a visible record that does not meet that criteria the
combo box for that row will appear empty. This is a little disconcerting to
the end user so you have to do a little extra work to avoid this problem.

To create the effect of a synchronized combo in a continuous form create
another textbox control, include the display column of the combo in the
Recordsource query of the form (join the foreign table and drag in the
column). Position and size the new textbox so that you can place it
directly over the combo box allowing only the down-arrow portion of the
combo to show.

Create a GotFocus event for the textbox that only does a SetFocus to the
combo.

This will create the effect that you are wanting - the correct display value
will always show even though the value itself might not be fit the criteria
that is in effect based on the current record.

Here's a link to my sample database that offers several different
alternatives for displaying this type of data including the technique
described above:
http://www.daiglenet.com/msaccess.htm

Also, here's a KB Article that explains the problem
ACC2000: Combo Box in Continuous Form Shows Incorrect Data
http://support.microsoft.com/default.aspx?scid=kb;en-us;208866
 
Thank you Sandra. Although I have been getting by with Access since October
2003, I think you just made me ask myself ... Why?
I think I followed you up until "testbox control". But I believe I got the
gist and will go to the sights you mentioned to broaden my knowledge.
As you may now know, I have had no formal training with Access and believe I
have just surpassed the knowledge I have gained through Trail and error.

Thanks again.
 
Welcome to the world of Access folk. Most of us started just where you're
starting and through trials and tribulations we figured it out (with a ton
of help from others!).

Post back if you have more questions.
 
Thanks again Sandra.
First ... Does it matter that I am using a single form ?

I went to the site, grabbed the sample SynchComboContinuous sample. To
assist, I copied the custid and name to my database and refered to it quite
often as I attepted to duplicate. I think I may have missed something. You
mentioned to join the foreign table and drag in a column. I have gotten to a
point where mine "looks" like your example. But can't figure out how to test
it, if it can be tested because I believe I have not completed what you
stated. (Maybe much of my problem is that I have been using Crystal Report
much longer)
Maybe a smack upside my head may help.
 
Back
Top