Hi all,
Access 2000 user.
The short Question
How do I get the actual text of a business name from a combo box on the enquiry form to be passed to a combo box on the contacts form, or how do i get it to resolve the id which it picks up from FRM_Enq to a name in the combo box on FRM_Contacts.
If you want the long version of the question with more details then read on....
I am creating a CRM style system.
I have a form for enquiries, on the Enquiry form a user enters the enters the business name in a combo box and if the name is not in the list then it prompts to create a new entry for the business. It sends the name entered to the business details form and allows the user to enter the rest of the details for the business and then returns them to the enquiry form.
This works Fine !!
The next field on the enquiry for is for the contact name which is also a combo box, similar function to above, on not in list
This part works fine as well.
The Problem
The contact is associated with a business and, the user has already entered the details of the business on the enquiry screen and if it is a new business then also the full details have been entered on the business details form.
What I am trying to do is send the business name from the combo box on the enquiry form to a combo box on the contacts form.
I have sent the contact name info as openargs. I tried using the WHERE option in the OPENFORM command to set the business ID to that of the Enquiry form with no luck. (-:
I tried using something like the following in the where clause
forms!FRM_Contact.bid = me.bid
[forms]![FRM_Contact].bid = me.bid
forms.FRM_Contact.bid = me.bid
none of the above seem to work.
so What I have done is pass the info with the openargs along with the new contact name info
so it look like this
DoCmd.openform "FRM_Contact", acNormal, , , , acDialog, Me.BID & "," & NewData
It passes both bits of information through, I have tested this and have managed to separate the bits using Mid,Left, Instr, Len etc.
but the actual data it is passing for the business id is the primary key for the business which is a number.
in the combo box the key fields are hidden, so if for eg. I try and assign the value 3 to the business id combo box on the contacts form it wont show the business related to that id instead it will show the value 3 as the text of the business name, (First visible Column).
How do I get the actual text of the business name to be passed to the contacts form, or how do i get it to resolve the id to a name in the combo box.
I hope this makes sense.
Idd
Access 2000 user.
The short Question
How do I get the actual text of a business name from a combo box on the enquiry form to be passed to a combo box on the contacts form, or how do i get it to resolve the id which it picks up from FRM_Enq to a name in the combo box on FRM_Contacts.
If you want the long version of the question with more details then read on....
I am creating a CRM style system.
I have a form for enquiries, on the Enquiry form a user enters the enters the business name in a combo box and if the name is not in the list then it prompts to create a new entry for the business. It sends the name entered to the business details form and allows the user to enter the rest of the details for the business and then returns them to the enquiry form.
This works Fine !!
The next field on the enquiry for is for the contact name which is also a combo box, similar function to above, on not in list
This part works fine as well.
The Problem
The contact is associated with a business and, the user has already entered the details of the business on the enquiry screen and if it is a new business then also the full details have been entered on the business details form.
What I am trying to do is send the business name from the combo box on the enquiry form to a combo box on the contacts form.
I have sent the contact name info as openargs. I tried using the WHERE option in the OPENFORM command to set the business ID to that of the Enquiry form with no luck. (-:
I tried using something like the following in the where clause
forms!FRM_Contact.bid = me.bid
[forms]![FRM_Contact].bid = me.bid
forms.FRM_Contact.bid = me.bid
none of the above seem to work.
so What I have done is pass the info with the openargs along with the new contact name info
so it look like this
DoCmd.openform "FRM_Contact", acNormal, , , , acDialog, Me.BID & "," & NewData
It passes both bits of information through, I have tested this and have managed to separate the bits using Mid,Left, Instr, Len etc.
but the actual data it is passing for the business id is the primary key for the business which is a number.
in the combo box the key fields are hidden, so if for eg. I try and assign the value 3 to the business id combo box on the contacts form it wont show the business related to that id instead it will show the value 3 as the text of the business name, (First visible Column).
How do I get the actual text of the business name to be passed to the contacts form, or how do i get it to resolve the id to a name in the combo box.
I hope this makes sense.
Idd