Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > Re: Access 2007...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 30166 of 31596
Post > Topic >>

Re: Access 2007 Form problem

by Salad <oil@[EMAIL PROTECTED] > May 5, 2008 at 09:32 AM

Brian McLaughlin wrote:
> Hi.
> Probably a simple problem but i'm pulling my hair out!
> I have 3 tables(Consultant name, hospital and medical department).
> Consultant name is joined to the other two by their primary key. I want
> to create a form with 3 drop down menus.
> I've managed to do the first two (choose hospital first, then medical
> department) but I want the third drop down menu(consultant name) to
> refer to the choices made in the first two drop down boxes and limit the
> names to only those sharing the same department and hospital. Can anyone
> help me please?
> 

Typically your first combo is the "master" combo.  When you select 
Hospitals, it then would requery the departments combo that exist for 
that hospital (which, if there's no default, would be null) and since 
there's no Dept selected, the consultant would be null.  When you update 
the Dept combo, the Consultant combo is requeried.  Ex:
	ComboHospital's AfterUpdate event
		Me.ComboDept.Requery
		Me.combodept = Null
		Me.ComboConsult.Requery
		Me.ComboConsult = Null

	ComboDept's AfterUpdate event
		Me.ComboConsult.Requery
		Me.ComboConsult = Null

I will assume that the filter for the ComboConsult might be something like
	Where [Hospital] = Me.ComboHospital And Dept = Me.ComboDept
or something like that.

Une americaine a Paris
http://www.youtube.com/watch?v=IkpuAQIdoD4
 




 2 Posts in Topic:
Access 2007 Form problem
Brian McLaughlin <bml0  2008-05-05 10:18:42 
Re: Access 2007 Form problem
Salad <oil@[EMAIL PROT  2008-05-05 09:32:29 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 11:28:50 CST 2008.