Joined: 16 Mar 2008
|Posted: Tue Apr 08, 2008 10:45 am Post subject: Combo - Update a 2nd table through a Combobox
after spending hours trying to manage to do some simple tasks I got disappointed....
I really need your help baddly,
I am building a sample database with contacts.
a) The name of the contacts should be kept on a separate table.
b) Two fields on the same form (frmContact), the fields "Name" and "Father's Name" should be taking data from the same table (tblNames)
What I would like to achieve is
1) On the main form (frmContacts), at the field of the Name there should be an autofilled combo which will allow me to enter or to select a name.
By typing the first couple of letters of the name then the first matching name, if there is one, of the tblNames should be displayed (that's the autofilled property I supposed, so it should be easy to be done)
If the name entered does not exist in the tblNames then, when the combo loses the focus, a question dialog should popup asking me, if the new nonexisting name, should be added to the list.
If my answer is Yes then that should be added otherwise the focus should go back to the combo.
2) Would it be possible to do the same with the Father's name field? I mean,
How can I connect the tblName with 2 fields of the same table (tblContact).
What sort of Relationship would that be?
Any idea on how to do this tasks.
Thanx indeed for your time