Well, the search function on the site is down, so I can't look for previous posts on this.
I'm hoping someone will take pity and present a solution for me.
Here's the issue: I have a form called frmAddNewJob that allows people to enter a new job (duh). On the form is a field cmbClientID that is a combo box that has two columns: ClientID and ClientName. Control source is a qryClientLoookup query. First column is bound and hidden, second column is the name, which is what I want people to select and get the ClientID into the field. It all works fine.
Now for the fun part. If the user adds a client that is not in the list, then I want the system to open the frmAddClient form and allow the user to add the client as a new one, save the form, and, in the frmAddJob form, have the new client show in the ClientID field. This is where I'm having problems.
I hope this makes sense, but here's the short version:
1. Open frmAddJob
2. Enter name that isn't in client list
3. Code asks if you want to add the client as a new one - answer yes
4. frmAddClient form pops up, the name you typed in on the frmAddJob shows as the company name
5. Add the rest of the client info
6. Click on the done button - you go back to the (still open) frmAddJob form
7. The client name you entered before is there and is also now part of the drop-down list so you can now carry on with entering the rest of the job info.
Okay, that's it.
Thanks in advance
Mike
I'm hoping someone will take pity and present a solution for me.
Here's the issue: I have a form called frmAddNewJob that allows people to enter a new job (duh). On the form is a field cmbClientID that is a combo box that has two columns: ClientID and ClientName. Control source is a qryClientLoookup query. First column is bound and hidden, second column is the name, which is what I want people to select and get the ClientID into the field. It all works fine.
Now for the fun part. If the user adds a client that is not in the list, then I want the system to open the frmAddClient form and allow the user to add the client as a new one, save the form, and, in the frmAddJob form, have the new client show in the ClientID field. This is where I'm having problems.
I hope this makes sense, but here's the short version:
1. Open frmAddJob
2. Enter name that isn't in client list
3. Code asks if you want to add the client as a new one - answer yes
4. frmAddClient form pops up, the name you typed in on the frmAddJob shows as the company name
5. Add the rest of the client info
6. Click on the done button - you go back to the (still open) frmAddJob form
7. The client name you entered before is there and is also now part of the drop-down list so you can now carry on with entering the rest of the job info.
Okay, that's it.
Thanks in advance
Mike