Unanswered: Binding more then one column in combo box
Hi all, I want to be able to allow the user to select a name out of one table using a combo box but also have it pull out the property address as well. This data needs then to be recorded in a new table along with and other data that is filled in on the same form eg addition comments. Any help would be greatly appreciated.
Unfortunately you cant have more than one bound column in a combo box.
BUT you can get details from its other columns.
If you create a combobox (combo1), and for example your table has these fields
Your combo box could have all these fields but only display the name.
If you go to the properties and make sure that column count is 6, but then the column widths are 0;3;0;0;0;0 (3 being cms, can alter this). All the other fields will not show, of course you can decide how many and what widths.
Then if you have a command like;
me.combo1.column(0) it will give you the ID me.combo1.column(5) it will give you the Postcode.
Please note that it always counts from 0 - first column, and not 1 !!
You'll need to make up a piece of code to grab all the other fields they have filled in and maybe use a sqlstring and Docmd to add a record to another table.
Hope this helps a bit..
If it doesn't tell me the field names and the table name its to go to, and I will work it out for you.
I have been trying to accomplish this same type of task and have 3 databases to "fix up" I got the combo box ok and understand showing different columns. What I can't figure out is what to do with me.combo1.column(3)
If I can take advantage of your offer to Peter Masters it would be a great service. Once I can see how one works, then I can apply it to my other databases.
Recordset and this type of information confuses the daylights out of me.
Simplest would be a classic movie database.
table: Master Tarzan List
0. ID (autonumber)
1. Movie Title
4. Date Released
This table will be used to create the combo box. and would list all Tarzan Movies
Table: Tarzan (Movies that I own)
0-6 as well as:
7. Format - (VHS, DVD etc)
My form Tarzan will list movies that I own
The Drop down box will show Movie Titles and I need information from boxes 2-6 to autofil from the drop box hidden columns.
Basically what I have is an employee list that is the source table. The form is using the employee list table to retrieve the
By selecting the EmployeeID I want to return the employeeID, LastName, and FirstName. This is all to be used for a time sheet to record employees work times. I am not experienced in using Access for this type of thing and would appreciate any help someone could offer. Thanks