Problem with combo box

osimini

New member
Local time
Today, 19:09
Joined
Aug 23, 2001
Messages
7
Headache

I have been trying for 2 weeks now to to get this to work no success.

I have tables for E, Cases, CaseEvents, Customers and Reminder.
I have created a form frmCustomer as mainform.Then another form frmCases. Also created two sub forms called: sfrmCasesEvents, fsubReminder.

fsubcaseEvent and fsubReminder are to subforms to frmCases


I am trying to allow the employee to select any employeeID in frmCases cmoEmployeeID field. Once the EmployeeID is selected in frmCases both subforms – fsubCaseEvents and fsubReminder cascade combo boxes are defaulted updated with the EmployeeID selected in the main form frmCases.

I have built cascading combo boxes before but all have been based upon a one to many relationship.

The following 4 tables show details of table

Employee
EmpD (PK) - autonumber
Empname - text

Case
CaseID (PK) - autonumber
EmpID - Number

CaseEvents
EventID – autonumber
CaseID - numver
EmpID - number

Remember
RemID - autonumber
CaseID – number
EmpID - number


I am using Access 2003

Can someone please help before I am having difficulty getting this to work. It is giving me headache. I have done everything possible
 
ACCESS_GUY49, thanks for your continued help. Attached is the relationship diagram of the database. Also, when I said what do you mean, what it was is that i did not know where that piece of code is supposed to go and if any part of the code was missing. I was not questioning you. Please my apology.
 

Attachments

...Also, when I said what do you mean, what it was is that i did not know where that piece of code is supposed to go and if any part of the code was missing. I was not questioning you. Please my apology.

I'm a little confused on this part of your statement. I have not given you any code??? Nor have you questioned any adivce I have ever given you because...well i have never given you advice. So i'm a tad confused as to what you mean there. Were you refering to my signature? 'What do you mean what do i mean?" because that's just a line I have at the end of all of my posts.

Anyways, not to worry because I have not taken any offence to anything you have said.

I attached a quick database, if you try out the employee form, tell me if it's the right idea for what your going for?
 

Attachments

Yes the test database is closer to what I am looking for, except that it the opposite. Instead of the employee form, I want it be frmCase form because the case form is to be use as a data entry form. See attached for more explanation. Thanks
 

Attachments

If you notice in my example, the 2 subforms will populate with existing records based on the employee ID selected in the drop down. In order to do this, the combobx on the main form needs to be unbound. You then set it's row sources. You set each of the subforms to use a where statement in their respective rowsources that address the unbound combobox in the main form. if the main form's combobox is bound to a field, it will not let you change it.

If all you want is to select an employee from the combobox on the main form and then populate their respective fields in the BLANK subforms (blank as in, ready for data entry not for data retrieval) then all you need to do is set up your main combobox as you nornmally would, and have it bound to it's proper field, and then in your subforms, set the default value of EmpID to equal the mainform combobox. You can do this using the build wizard in the 'default' property of each of the subforms fields. This will populate the fields automatically but would only be useful for data entry.

hopefully that makes sense??
 

Users who are viewing this thread

Back
Top Bottom