Hey,
I have made a form with a combobox where the user can choose to pick a specific company or pick ALL companies. The table which the combobox is built upon consists of two columns [CompanyID, Company] where CompanyID is the primary key. The problem I have is that the combobox only return the CompanyID to the table, and what ive understood thats what its suppose to do. But since the users of this database is only intrested in the "text value" of the company instead of the CompanyID I need to change it.
Ive tryed to use "DLookUp()" which works aslong as the user picks one specific company. But as soon as he picks "ALL" i get nothing. That is also not so strange since DLookUp() only returns one value what Ive understood.
Ive also tryed to change the two columns in the table to [Company, CompanyID (PK)]. One person told me that Combobox read from the left to the right. But for me this diden't work either.
Ive also heard you can use [Forms]![My Form]![My cbobox].[Column](1) or something. But I don't know if im doing right thing since I get a error message, "Function is not known" when I try this.
If you have any tips or trix how to fix this your more than welcome.
Greetings Access Newbie Carl
I have made a form with a combobox where the user can choose to pick a specific company or pick ALL companies. The table which the combobox is built upon consists of two columns [CompanyID, Company] where CompanyID is the primary key. The problem I have is that the combobox only return the CompanyID to the table, and what ive understood thats what its suppose to do. But since the users of this database is only intrested in the "text value" of the company instead of the CompanyID I need to change it.
Ive tryed to use "DLookUp()" which works aslong as the user picks one specific company. But as soon as he picks "ALL" i get nothing. That is also not so strange since DLookUp() only returns one value what Ive understood.
Ive also tryed to change the two columns in the table to [Company, CompanyID (PK)]. One person told me that Combobox read from the left to the right. But for me this diden't work either.
Ive also heard you can use [Forms]![My Form]![My cbobox].[Column](1) or something. But I don't know if im doing right thing since I get a error message, "Function is not known" when I try this.
If you have any tips or trix how to fix this your more than welcome.
Greetings Access Newbie Carl