[mso] Re: Access ComboBox??

  • From: "April Pace" <4office@xxxxxxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Mon, 6 Jan 2003 16:43:14 -0500

Can I have the combobox look up the info on another table and if the Say Dr.
A is listed ok great they choose Dr A. and all of his stuff is linked to
this client... but if they select the "record" <<New Doctor>> then with VB
make it open the Doctor Table to create the new doctor, with his info, then
link back to the main form (that is still open) and populate the Doctor's
Name in the appropriate field??  (linking of course)

-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx]On
Behalf Of Colli, Anthony G
Sent: Monday, January 06, 2003 9:28 AM
To: 'mso@xxxxxxxxxxxxx'
Subject: [mso] Re: Access ComboBox??


April-

 ComboBoxes have a 'OnNotInList' event that programmatically allows you as
the developer to deal with additions to the underlying data of a combobox.
This is an example of adding a new city to a combobox.
http://www.uvm.edu/~acolli/VBA/code.php?id=5 In your case it might be more
difficult because you want to display quite a bit of info in the combo box.

 To add <<add new>> to the RecordSource of a combobox, write a union query
something like this.

 SELECT '<<Add New>>'
 UNION SELECT City FROM Citys

 Then in the comboboxes 'OnChange' event check to see if <<Add New>> was
selected, and work accordingly.

-Anthony



-----Original Message-----
From: April Pace [mailto:4office@xxxxxxxxxxxxx]
Sent: Sunday, January 05, 2003 4:40 PM
To: Office (E-mail)
Subject: [mso] Access ComboBox??


Ok on my ClientInfo Table/Form  I have three fields txtDrPriID ....
txtDrSecID .... txtInsID ....

I have a Doctor Info Form for the Name, Address, Phone of all the doctors
and the same for the Insurance Companies.

Ok here is what I am thinking....

When (on the ClientInfo Form) the user gets to the txtDrPriID field, I want
then to get a ???ComboBox??? list of Doctors that we already have info on or
if it is a new doctor add their info to the Doctor Info Form.  Either way,
just the Doctor's Name will show on the ClientInfo Form....

When they click on the txtDrPriID (or the txtDrSecID)  dropdown box I want
them to see:

<<Add New>>
Dr. A | Address | Phone
Dr. B | Address | Phone
Dr. C | Address | Phone

If they click on the Dr. A ok they are linked to  Dr. A (and later I will be
able to find out how many of my Clients see Dr. A)
If they Click on the <<Add New>> then the the Doctor's Form will open and
they will fill out his info, say on Dr. D,  Now the next Client that they
Fill out info on on the ClientInfo Form and they get to this field and click
on the Dropdown list, their list will be:

<<Add New>>
Dr. A | Address | Phone
Dr. B | Address | Phone
Dr. C | Address | Phone
Dr. D | Address | Phone

The list for txtDrPriID and the txtDrSecID fields will be identical...
Client 1 see's Dr. A as their Primary and Dr. B as their Secondary and
Client 2 See's Dr. B as their Primary and Dr. D as their Secondary.


When I figure out how to do this, my Insurance field (table/Form) will work
the same way.

April



*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to
mso-request@xxxxxxxxxxxxx?Subject=unsubscribe

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation
with instructions.  Once you are a member of the files group, you can go
here to upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to
mso-request@xxxxxxxxxxxxx?Subject=unsubscribe

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation
with instructions.  Once you are a member of the files group, you can go
here to upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx?Subject=unsubscribe

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: