Combo on Form?

Ani

Registered User.
Local time
Today, 10:16
Joined
Mar 10, 2012
Messages
196
Hi folks
sorry to be dumb but Im really frustrated. Trying to put a simple combo box or drop down list on a form.
I have followed these instructions (using wizard)-
http://office.microsoft.com/en-ca/a...bo-box-or-drop-down-list-box-HP005240581.aspx
The form was created from a query using tblCustDetails
I have created a tblTitle with "Mr, Mrs, Miss, Ms, Dr", it has a FK CustID.
tblTitle is joined on relationships to CustDetails (1-many)
When Ive completed the instructions on the help the drop down list does not display the "mr, mrs etc"
Can anyone tell me what I am possibly doing incorrect or point me to another tutorial, please?
Cheers
Ani
 
You have to set the ColumnCount property to 2.
 
ColumnCount property is set at 7? Two of the columns in the title table are PK & FK. Should I set it to 5?
Thanks
Ani
 
I think the ControlSource is incorrect. I dont know how to change it or how to set it correctly. Should the ControlSource be the FK?
Ani
 
Your table that contains the titles should have two columns TitleID (PK, Autonumber), and Title.

Your Combo should then be bound to your tblCustDetails where the TitleID will be stored as a Foreign Key (FK). If you then follow the Combo Box wizard your Combo should work.

The Row Source for your Combo will have two columns, the TitleID and Title the first column should contain the TitleID, this column will be the bound column and should be hidden.
 
  • Like
Reactions: Ani
Your table that contains the titles should have two columns TitleID (PK, Autonumber), and Title.

Your Combo should then be bound to your tblCustDetails where the TitleID will be stored as a Foreign Key (FK). If you then follow the Combo Box wizard your Combo should work.

The Row Source for your Combo will have two columns, the TitleID and Title the first column should contain the TitleID, this column will be the bound column and should be hidden.

Thanks John.
Im going to try and follow that.
Ani :)
 
Dont understand why Im finding this so difficult! Giving up for today! Have a lovely Sunday.
Ani
 
Ani

Can you post a copy of your database.

Just the two Tables queries and the form.

Save as Access 2003 first. Not everyone drives the latest model.
 
Ani

Can you post a copy of your database.

Just the two Tables queries and the form.

Save as Access 2003 first. Not everyone drives the latest model.

OK, Thanks Rain!
Ani :)
 
I have changed the tables. Im not sure I am any nearer to working this out. Have attached the DB again and what I seem to be getting when I try and do the combo box.
Very confused now.
All help appreciated. Many THanks
Ani:o
 

Attachments

Maybe this is what you want:

Thank you so much. I misunderstood Johns suggestion of "Your table that contains the titles should have two columns TitleID (PK, Autonumber), and Title."
So I understand what you have done with the list table, though I dont understand why or how that works, except its the FK?
I need to work out how the drop arrow then shows the titles to pick from so that when a form has new data entered the choice is there automatically.
Also need to look at properties and relationships to see how you have done what I have been unable to do!
Thank you!
Ani :)
 
Please tell me if it is correct to put "Mr,Mrs,Ms,Miss,Dr" in the Criteria line on the query under TitleID field to show the drop down choice?
Thank You
Ani
 
What query? and why do you need to apply criteria?

Oh, Im on the wrong lines here then. When I Click on the arrow on the combo box on the form I want it to show the choice of "Mrs, Mr, Miss, Ms, Dr" to choose the title of the customer.
I thought maybe I should do it in the query that the form is created from.
Im trying to learn how the combo boxes work because I may need to use them for more complicated choices at a later stage. I thought creating a drop down list of the above titles would be an easier way to learn how to do this. I just dont want to have to manually type in a persons salutation every time I enter a new person.
Sorry I have watched loads of tutorials and read through help files and am really confused.
Ani
 
I dont understand where the choices "Mr, Mrs etc" come from or where they are entered when they are not in the title table or on the query that is used to create the form.
Im sorry, this must be really frustrating from your view point!
Ani
 
Please tell me if it is correct to put "Mr,Mrs,Ms,Miss,Dr" in the Criteria line on the query under TitleID field to show the drop down choice?
Thank You
Ani
No. Do not do that.

Look at the properties of the Combo Box.

Look at:

Control Source. This come from thr query behind the form.

Row Source. This come from the Table that holds the original choices.

Bob's Query for the form should not include the Table tblTitleList So delete that table from the query.
 
I dont understand where the choices "Mr, Mrs etc" come from or where they are entered....
Read this slowly, and then read it again.:)
"Mr, Mrs etc" are each records of the Titles table. The combo box uses the Titles table for its "Row Source" property.
The combo box has two columns (TitleID which is a number and Title which is text) but only the second is shown when the combo is dropped open because the "Column Widths" property is set to 0cm;0.769cm. "TitleID" is in the column that is set to 0cm and "Title" is in the column that is set to 0.769cm.
The combo box is bound to the "TitleID" field (its Row Source property) in the table that the form is bound to ("tblCustomerDetails").
When a selection is made in the combo box it is the "TitleID" value that is stored in the forms bound table. If you select "Miss" in the combo box for the customer (CustID 1) "Lesley Waaaaaa", save the record nad then open the "tblCustomerDetails" table, you will see that the number stored in the record for TitleID is 3, which is the ID number of "Miss" in the "tblTitleList" table.
 

Users who are viewing this thread

Back
Top Bottom