ComboBox

connerlowen

Registered User.
Local time
Today, 17:56
Joined
May 18, 2015
Messages
204
HI,

I want a combo box in a form for data entry. Is the best method in doing this creating a new combo box in the form and linking it to a table, or using a lookup field in my table?

Thanks,

Conner
 
Yes, create a query linked to a form and build your combo box using that query by following the wizard. But just fyi, combo boxes aren't for data entry, they're used for selecting pre-defined values from it... maybe that's what you meant.
 
That is what I meant. I want a combo box for example to select the customer or supplier from their tables respectively. I also want to enter all of the different precious metals, and base metals into a table and have combo boxes for them as well. I want to have as many combo boxes as I can to eliminate the possibility of incorrect data entry.

To create the combo box for the base metals for example, I need a table with a PK and the names of all of the base metals. From that I will create a select query, and then create the combo box in my form based on the query?
 
That's precisely what they're there for, "eliminate the possibility of incorrect data entry".

That's right, in the query only include the relevant fields you wish to use on the combo box. Remember to include the unique ID field because that's what you will use as the bound field.

Play around with the combo box wizard and you'll get the hang of it.
 
Thank you very much. How do I get the selection to be entered into the field I want it in? Is that basically the last step in the wizard that says store value in (blank)?
 
The form you're dropping your combo box on needs to be bound otherwise it will show blank.
 
So create the form based on the table, and replace the default control for the field with my combo box?
 
Yes, create a form based on the relevant table and place a combo box on it following the wizard.
 
Thank you. I just wanted to make sure I was thoroughly understanding the process.
 
No problem! The wizards in Access are a great place to start, because it shows you how components work together to 'generate' a control.
 
I have a form with a combo box to select the customers. in the relevant table field customer the customerID is being filled in, I want it to be the Customer Name. Is there a code I need to enter into the After Update Event of the combo box to remedy this?
 
You can look into the following properties of the combo box:

Column Count (Format tab)
Column Widths (Format tab)
Bound Column (Data tab)
 
I have another question.

I have a pop-up form with the combo box for customers. I want the control tip to show up when the focus is moved to that particular control. In this case, the form opens with focus on that control. Currently the control tip shows up only if the mouse hovers over the control.

Thanks,

Conner
 
That's how the Control Tip functions. If you want a different behaviour then you'll need to look into an API that does that. You could use the Status Bar to display that text instead.
 
The status bat is hidden behind the form because the form takes up the whole screen. Ill play around with some code.

Thanks,

Conner
 
Create your own: put a label in the footer section of your pop-up form, and show it there.
 
I understand putting a blank label in the footer section of the form, but how do I get it to display what I want it to display?
 
Can I put these questions back to you:

1. What property does a label use to display text?
2. What event do you want this to fire? Hint: You mentioned, "I want the control tip to show up when the focus is moved to that particular control".
 

Users who are viewing this thread

Back
Top Bottom