Help! Strange combo box problem...

  • Thread starter Thread starter chris230
  • Start date Start date
C

chris230

Guest
Well I used the search feature and nothing came up, so I'm going to go ahead and ask this. This may just need a quick fix but I've been working on it for over an hour and its starting to really frustrate me...

I'm creating a combo box for Market Segments (ie Business, Medicine, etc). I enter my values in the wizard and create the combo box, but when I am entering data and select a value (ie Business), "Business" is selected in ALL the other pages of the form. In other words I can't select "Business" on on page and then select "Medicine" on the next without changing all the pages to "Medicine".

Thanks in advance for your help!
 
Hi - and welcome!

When you say "page" do you mean you have continuous forms or continuous subforms? Or do you have different tabs set on a single form?

Is the Market Segment combo box bound to a table field?

If you are using an unbound combo box on continuous forms/subforms then I may have run into this before. It turns out that despite what it appears, there is actually only one copy of the combo box. So when you set it to "Medicine" all the other rows display the same thing because they are actually showing the same combo box.

I know of a workaround that involves overlaying a text box on the combo box. It may not be the best approach, but if it sounds like this is your situation I'll try to walk you through it.

- gromit
 
Yes I'm referring to a continuous form. And your description could very likely be what I am running into. If you could explain your suggestion that would be appreciated.

I am able to have selections from the combo box displayed in a text box without any problems, but I prefer not to have a combo box AND a text box appear side-by-side on the same page if it can be helped.

Thanks
 
The general approach is this -

1. Start with your combo box on the form.
2. Overlay a text box on the display part of the combo box. I.e. the text box covers the area of the combo box where text is displayed, but not the pull down square.
3. The OnEnter event for the text box is set to switch focus to the combo box. [Since the text box is on top, a user might click the display portion and want to enter text.]
4. The AfterUpdate event for the combo box is set to change the value of the text box to the appropriate value.

In looking back at this, the approach was used for filtered combo boxes. I tried playing around for a couple of unbound combo's, but it seemed to either work for both a normal combo and the overlaid one, or neither. [Credit where credit is due: This comes from "Building Microsoft Access Applications" by John Viescas".]

So maybe I am barking up the wrong tree???

Hope this helps and sorry for distracting if it doesn't

- g
 

Users who are viewing this thread

Back
Top Bottom