Combo Box problem

Matizo

Registered User.
Local time
Today, 10:58
Joined
Oct 12, 2006
Messages
83
Hello,

I have created the combo box to select the customer lastname in my form, so that the rest of details of that customer appear. However the problem arises when 2 customers have the same lastname. Well I could use the record selectors to change between them but I would prefer rather the combo box to show the FULLNAME of the customer or to have a second combo box to select a first name of the customer ie: i use the 1st combo box to choose the lastname and then the 2nd combo box to select a first name of that customer.

For example:

Customer 1 firstname: A lastname: C
Customer 2 fisrtname: J lastname: U
Customer 3 firstname: B lastname: C


In my 1st combo box (lastname) I have chosen C. (there are two customers with this lastname)

In my 2nd combo box I can choose only: A or B .

Any suggestions how can I do it??
Thanks a lot!
Matt
 

Attachments

Thanks, that's great! :)
It wasn’t so complicated as I thought it was.

Thanks a lot,
Regards
 
Hi again

The combo box works fine. But I have another problem now. I have used subforms to show some information regarding customers. They are also depended on that combo box. When I choose customer, subforms show correct information (about that customer) . but when I want to edit data or add new record I’ve got error msg:

“Index or primary key cannot contain a null value”

I tried to change the primary keys data types to autonumber but it messed up everything.
Any suggestion how can I fix it?

Thanks,
Matt
 
Here it is. try to add new record to tblcustomer using the frmCustomersDetails. And btw..I deleted one field from tblWorks and now the forms ask for that field. I removed that from queries etc. and the problems still occur.

Thanks!

Regards Matt.
 
Hello,
Sorry I was away for a while.
The database you attached is not up to date and I have changed layouts and add new subforms and tabcontrols.
I tried to changed the data types to a autonumber and then to re-establish relationships but there still seems to be a problem (or I’ve done something wrong).
I attached the new copy. I had to delete some forms and queries and I left just the customers things.

Thanks a lot! , really appreciate it!

matt
 

Attachments

Users who are viewing this thread

Back
Top Bottom