Gustav Brock
gustav at cactus.dk
Wed Sep 24 03:38:04 CDT 2003
Hi Michael This requires, of course, that you _never_ (the dangerous word) will have a CustomerName represented twice or more in the table ... Personally, as you do have a unique key, I would follow the advice of William. /gustav > Thanks for your reply Stuart & William > Strangely enough, neither text field requires a value > and can be a zero-length string. > I was able to set the bound column to 2 and > set the column widths to 0;0;1. > Mike Mattys > ----- Original Message ----- > From: "Stuart McLachlan" <stuart at lexacorp.com.pg> > To: "Access Developers discussion and problem solving" > <accessd at databaseadvisors.com> > Sent: Tuesday, September 23, 2003 9:38 PM > Subject: Re: [AccessD] ComboBox Rowsource With 2 Field PK >> On 23 Sep 2003 at 21:23, Michael R Mattys wrote: >> >> > Hi Access-D, >> > >> > I have a table which cannot be edited per client >> > instruction. It is linked into the current database >> > as the customer table and has two text fields that >> > comprise the primary key (Division and CustomerNo) >> > >> > A third field, CustomerName, is the one I would like >> > to show in my combobox on my form in order to >> > select a customer. I cannot, however, make one >> > or the other the bound column as the customer name >> > just disappears. >> > >> > I have tried Bound Column: 1,2 and 1;2. >> > Doesn't work. >> > Does anyone know what I must do? >> > >> > Mike Mattys >> > >> > >> >> You can only bind to a single column. >> >> Preferably, redesign the customer table and related tables so that >> you key on a single field (see the archives for discussions on >> natural v surrogate keys) >> >> Alternatively, you *could* make the combobox unbound and set the key >> fields in a before_update.