Changing background color of items in combo list

Well we have just seen that when we drop the column the bound column is returned.

That has been my understanding.

In the mean time, since you have A2010 and the message box returns the ID column, have you tried dropping the column and testing again.

Sometimes what can happen is that changing: -
Me.lstDayShift
to: -
Me.lstDayShift.Column(2)
even though they refer to the same thing, actually only forces a recompile.

So people may think the fix was the fix but in fact it was the recompile that did it.

Therefore changing from: -
Me.lstDayShift.Column(2)
back to: -
Me.lstDayShift
may also fix the problem, and for the same reason…the recompile.


But there may still be something strange going on here that I can’t see.

Regards,
Chris.
 
Well, what do you know, now when I removed the ".Column(2)" it worked. :)
 
One of the things that does concern me is that we need to be careful not to spawn another urban myth.

But if it's not an urban myth then that parrot needs to be nailed to its perch.

Looks like the Bound Column parrot is nailed to its perch.
RIP BC. :)

Regards,
Chris.
 
Kryst51 and ChrisO;

I deleted the previous control and code from my project to start fresh with the latest example given by Kryst51.

I imported into my project the form from Kryst51 example. I then opened the form in my project and cut/paste in the four parts that make up the control. I then created the events for: form open, the command button, and the two list boxes. I also made sure to copy over the other parts of the code present in Kryst51 example.

I then compiled my project and changed the form from design mode to form mode. When I do this, I get a Runtime error '2950' Reserved Error. When I debug the line in question is "Me.cmdShowLists.SetFocus" What did I do wrong? The control opens fine without error until I try to incorporate the control into my main user form as described above.

chris
 
Is the name of your combo box once copied over still cmdShowLists?
 
Is the name of your combo box once copied over still cmdShowLists?


I'm not seeing a combo box in the control but I do see a command button that is named cmdShowLists in your solution and it did carry over the name to my controls command button.
 
I'm not seeing a combo box in the control but I do see a command button that is named cmdShowLists in your solution and it did carry over the name to my controls command button.

Don't know if it helps or not but the control on the form is "expanded" to show both AM/PM times when this error happens upon opening the form/changing from design view to form view.
 
That's what I meant, sorry.

If you can, upload your db, the one you copied everything into to here.
 
I think I'll run into an issue with the DB size. Let me see if I can remove most of the records and ZIP if that helps.

chris
 
Here is my full project minus most records and stuff to trim down size.

chris
 

Attachments

Try this I moved the line "SetVisibility False" From the Form Open Event to the Form Load event after the go to new record command. I have attached the changed version

EDIT: I am not sure why, maybe it has something to do with the fact that on the open event the "cmdShowLists" button is loaded? But I googled the error along with "set focus" and found this solution in a thread found here.
 

Attachments

Try this I moved the line "SetVisibility False" From the Form Open Event to the Form Load event after the go to new record command. I have attached the changed version

EDIT: I am not sure why, maybe it has something to do with the fact that on the open event the "cmdShowLists" button is loaded? But I googled the error along with "set focus" and found this solution in a thread found here.


you're a genius!! Can you remind me how to stop the control from showing through all the tabs? I only want it to show on the first tab, but it "bleeds through" onto the other tabs.

chris
 
That means that you didn't get the controls into the tab, but only on the form. I'll have to play around with it to see if I can get it.
 
That means that you didn't get the controls into the tab, but only on the form. I'll have to play around with it to see if I can get it.


you just joggled my memory. Don't I have to drop the control onto the tab for the page I want and not on the page itself?

chris
 
OK, Cut the controls as a group off of your form. Select the tab control, and make sure an orange box (border) comes up. Click on it to make sure your there then paste the controls you cut back on. This should paste them into the tab which is on the form instead of pasting it on the form.
 
Oh, I also think the "[Event Procedure]" on the click events need to be redone to connect the controls with their code. It got broken when I moved everything.
 
thank you Sir. All appears to be well. I'll be putting it through the paces.

chris
 
And thank you from me too, Kryst51.

Chris.
 
You are both very welcome, I am glad you got everything working. :)
 

Users who are viewing this thread

Back
Top Bottom