Find record in form, not working in subform.

Neimad

Registered User.
Local time
Today, 09:30
Joined
Jul 11, 2007
Messages
19
Ok, This is tricky to explain, bear with me.

Basically,

I have 3 levels of data:

Company
Department
Contacts

You choose the company first, then the department, then the contacts. I did this by having a sub form of contacts embedded in department and department embedded in company.

Now, this does work, it only will display the departments that match the company and the contacts that much the department.

The drop-down box will also only display the contacts that match that department. I did this by running a query, and basing the drop down box on that query.

Ok, Hope your following. This works fine on the Department form which has the contacts form embedded. But once I embed that form into the main, company form it breaks. And nothing seems to work. Even the drop-down box in department will not work :confused:

Any ideas
 
Last edited:
it may be a referencing problem. if you refer to the control on a ma1n form

me!Control or Forms!form1!Control

then embed that form in another form (Say form2) the original reference will be incorrect

To correct it add the top level form to the reference
Forms!Form1!Form2!Control
 
Hi, it was a incorrect query after all that! Sorry and thank you for help :)
 
Got everything working :). One last question, is there a line of code i can run to get the record to update? I know it does this automatically but i need to so i can requery the position list box as soon as they leave the position textbox?

EDIT: Used 'DoCmd.RunCommand acCmdSaveRecord' and it worked.

Thanks! :)
 
Last edited:

Users who are viewing this thread

Back
Top Bottom