Linking Subform in Tab Control to Main Form (1 Viewer)

Orbik

Registered User.
Local time
Today, 14:16
Joined
Mar 25, 2013
Messages
13
Hi All
Last night I was working on a new db and wanted to use a few subforms inside a Tab Control. One subform per Tab.
I linked the forms last night and everything was working fine. but loading it today I am getting the following error:

The LinkMasterFields property setting has produced this error: 'A problem occurred while CLDesigns was communicating with the OLE server or ActiveX Control'

Main Form = frm_1_Customers

Subform in Tab1 = frm_1_Projects_Subform
Subform in Tab2 = frm_1_CustomerContacts_Subform

Both subforms have the field customerID which are linked in the relationships to the ID of the customers table.

I Originally I had problems linking the table using the following:
Link Master Fields: ID
link Child Fields: customerID

I searched and found this ttp://access.mvps.org/access/forms/frm0031.htm
so I changed the link fields to something like the following:
Link Master Fields: ID
Link Child Fields: Forms!frm_1_Customers.frm_1_CustomerContacts_Subform.Form.customerID

that didnt work either, I then pressed the button to open the Subform Field Linker Dialog box and pressed Suggest... It offered me the following.
Link Master Fields: ID
link Child Fields: customerID

It then started working but I wondered why it didn't work the first time I tried this but thought using the Field Linker it had done something in the background.

Has anyone got any suggestions? I have read that the error could be something to do with my VBA or language settings on my computer. All I have in the way of VBA so far is a few DoCmd.OpenForm with a Where condition set on a DblClick event on a few text boxes on the subforms.

Thanks




Edit: Bit More Info.
Changed the order of tabs/subforms in the post.
The Main form is a split form.
The error only appears when changing to a record, with tab 2 selected. If tab one is selected and I change to a new record then everything works fine.
I then changed allow additions to "No" on the contacts subform (Tab2) and now the error does not appear.
Both the links are exactly the same so not sure why it is not working. I have checked for typos and everything seems ok.
 
Last edited:

JHB

Have been here a while
Local time
Today, 15:16
Joined
Jun 17, 2012
Messages
7,732
Your Master/Child linking problem sound strange!
Could you post your database with some sample data + info which form you've the problem, (zip it because you haven't post 10 post yet).
 

Orbik

Registered User.
Local time
Today, 14:16
Joined
Mar 25, 2013
Messages
13
Hi JHB

thanks for the reply.

Please find attached the db.

The home page will open, press Customers.
This is the form I have a problem with. I have resolved to switching between customers so no error appears. It is when I try to add a new contact or project from one of the subforms when the error appears.
It is defiantly not automatically filling out the customerID field from the ID field from the Main Form.

Thanks ever so much for taking the Time to help.

View attachment CLDesigns - Copy.zip
 

JHB

Have been here a while
Local time
Today, 15:16
Joined
Jun 17, 2012
Messages
7,732
It seems to have been corrupted, I've imported all in a new database and now it runs.
If you want to do it yourself, then create a new database and import all objects from the old database.
 

Attachments

  • CLDesigns -NewImport.zip
    138.5 KB · Views: 566

Orbik

Registered User.
Local time
Today, 14:16
Joined
Mar 25, 2013
Messages
13
It seems to have been corrupted, I've imported all in a new database and now it runs.
If you want to do it yourself, then create a new database and import all objects from the old database.

Thank you so much, I wouldn't have tried that. I started a new db with the same setup and it worked so I was well stummped.
Any Ideas how it could get corrupted?

I cant thank you enough.

Kind Regards

Chris L.
 

JHB

Have been here a while
Local time
Today, 15:16
Joined
Jun 17, 2012
Messages
7,732
Any Ideas how it could get corrupted?

I cant thank you enough.

Kind Regards

Chris L.
No not really - it happen now and then, (when you made changes in it).
You're welcome, luck with it.
 

Orbik

Registered User.
Local time
Today, 14:16
Joined
Mar 25, 2013
Messages
13
Hi JHB Back Again, Everything works OK thank you, but any form that is supposed to be full screen isn't and when I go to create any new tables, forms, Reports etc... they are also in window mode rather than full screen.
Any Ideas? I didn't know if you had pressed a button somewhere to enable this functionality?
Pop Up on the forms are set to No.

Cheers
 

Orbik

Registered User.
Local time
Today, 14:16
Joined
Mar 25, 2013
Messages
13
I have worked around it using the DoCmd.Maximize but unsure why I need to.
 

Orbik

Registered User.
Local time
Today, 14:16
Joined
Mar 25, 2013
Messages
13
Thank you that did it. I will leave you alone now.

Thank you so much for your time.
 

JHB

Have been here a while
Local time
Today, 15:16
Joined
Jun 17, 2012
Messages
7,732
You're welcome, luck with your project. :)
 

Users who are viewing this thread

Top Bottom