Sub Form Problems

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've tried to read through and follow previous threads on related issues, but
unfortunalty still can't my prob resolved. I suspect I am missing something
basic.

1) I have a form, with an event "on Click" that opens another form and
selects the relavent data from the first firm, using the condition
[Personal Details]![Last Name]=[Forms]![View Personal Details]![Last Name]

However when this form becomes a sub-form it then dosn't work.
What changes do I need to make? and where?

2) I have another form, with sub-form but keep getting the message "The
LinkMasterFields property setting has produced this error:......"

The Main form has a Primary Key on "Event Ref" and has a One-to-many
relationship with the "Attendees" Sub form. Attendeeds has two Primary Keys
on Event Ref: and Email address.

The Link Child / Master propertys seem to be set to link between "Event
Ref:" in the two fields, but I still get the error.

Any pointers / tips on these probs would be much appreciated.

Many thanks

Winger
 
I've solved 2) - started from stratch and now working - No idea what I've
done different!!?

but still not solved 1)

Many thanks

Peter
 
You have to reference the form THROUGH the main form. In general, it looks
like this:

forms!mainform!subformControl.Form!Control

or in your case:
Forms!MainForm![View Personal Details].Form![Last Name]

Now, this assumes that the subform and the subform *control* (that is the
control object on the main form that holds the subform) are both named "View
Personal Details".

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called "SubformReference.mdb" which illustrates a number of issues
with referencing subforms and subsubforms.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
Roger,

Thanks for this - got it working. As the Subform also acts as a stand alone
form elsewhere in the data base, it seems to mean I have to have two versions
of the macro - one that references the link when its in stand alone mode, and
one that links it through the main form when its a subform. I can live with
this, as at least its working.

thanks again

Winger



Roger Carlson said:
You have to reference the form THROUGH the main form. In general, it looks
like this:

forms!mainform!subformControl.Form!Control

or in your case:
Forms!MainForm![View Personal Details].Form![Last Name]

Now, this assumes that the subform and the subform *control* (that is the
control object on the main form that holds the subform) are both named "View
Personal Details".

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called "SubformReference.mdb" which illustrates a number of issues
with referencing subforms and subsubforms.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L




Winger said:
I've tried to read through and follow previous threads on related issues, but
unfortunalty still can't my prob resolved. I suspect I am missing something
basic.

1) I have a form, with an event "on Click" that opens another form and
selects the relavent data from the first firm, using the condition
[Personal Details]![Last Name]=[Forms]![View Personal Details]![Last Name]

However when this form becomes a sub-form it then dosn't work.
What changes do I need to make? and where?

2) I have another form, with sub-form but keep getting the message "The
LinkMasterFields property setting has produced this error:......"

The Main form has a Primary Key on "Event Ref" and has a One-to-many
relationship with the "Attendees" Sub form. Attendeeds has two Primary Keys
on Event Ref: and Email address.

The Link Child / Master propertys seem to be set to link between "Event
Ref:" in the two fields, but I still get the error.

Any pointers / tips on these probs would be much appreciated.

Many thanks

Winger
 
Roger,

I've moved the subform onto a tab control to get more room, and now it
dosn't work again!! How do I reference it through a tab control??

Many thanks



Roger Carlson said:
You have to reference the form THROUGH the main form. In general, it looks
like this:

forms!mainform!subformControl.Form!Control

or in your case:
Forms!MainForm![View Personal Details].Form![Last Name]

Now, this assumes that the subform and the subform *control* (that is the
control object on the main form that holds the subform) are both named "View
Personal Details".

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called "SubformReference.mdb" which illustrates a number of issues
with referencing subforms and subsubforms.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L




Winger said:
I've tried to read through and follow previous threads on related issues, but
unfortunalty still can't my prob resolved. I suspect I am missing something
basic.

1) I have a form, with an event "on Click" that opens another form and
selects the relavent data from the first firm, using the condition
[Personal Details]![Last Name]=[Forms]![View Personal Details]![Last Name]

However when this form becomes a sub-form it then dosn't work.
What changes do I need to make? and where?

2) I have another form, with sub-form but keep getting the message "The
LinkMasterFields property setting has produced this error:......"

The Main form has a Primary Key on "Event Ref" and has a One-to-many
relationship with the "Attendees" Sub form. Attendeeds has two Primary Keys
on Event Ref: and Email address.

The Link Child / Master propertys seem to be set to link between "Event
Ref:" in the two fields, but I still get the error.

Any pointers / tips on these probs would be much appreciated.

Many thanks

Winger
 
It shouldn't make a difference. The reference should remain the same whether
it is on a tab or not. You do not reference the tab control in any way in
this case. How are you referencing it?

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


Winger said:
Roger,

I've moved the subform onto a tab control to get more room, and now it
dosn't work again!! How do I reference it through a tab control??

Many thanks



Roger Carlson said:
You have to reference the form THROUGH the main form. In general, it looks
like this:

forms!mainform!subformControl.Form!Control

or in your case:
Forms!MainForm![View Personal Details].Form![Last Name]

Now, this assumes that the subform and the subform *control* (that is the
control object on the main form that holds the subform) are both named "View
Personal Details".

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called "SubformReference.mdb" which illustrates a number of issues
with referencing subforms and subsubforms.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L




Winger said:
I've tried to read through and follow previous threads on related
issues,
but
unfortunalty still can't my prob resolved. I suspect I am missing something
basic.

1) I have a form, with an event "on Click" that opens another form and
selects the relavent data from the first firm, using the condition
[Personal Details]![Last Name]=[Forms]![View Personal Details]![Last Name]

However when this form becomes a sub-form it then dosn't work.
What changes do I need to make? and where?

2) I have another form, with sub-form but keep getting the message "The
LinkMasterFields property setting has produced this error:......"

The Main form has a Primary Key on "Event Ref" and has a One-to-many
relationship with the "Attendees" Sub form. Attendeeds has two Primary Keys
on Event Ref: and Email address.

The Link Child / Master propertys seem to be set to link between "Event
Ref:" in the two fields, but I still get the error.

Any pointers / tips on these probs would be much appreciated.

Many thanks

Winger
 
I simply cut and pasted the subform onto a tab, and the link doesnt't work,
so I assumed a difference reference was required that perrhaps itemised the
tab number it was on?



Roger Carlson said:
It shouldn't make a difference. The reference should remain the same whether
it is on a tab or not. You do not reference the tab control in any way in
this case. How are you referencing it?

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L


Winger said:
Roger,

I've moved the subform onto a tab control to get more room, and now it
dosn't work again!! How do I reference it through a tab control??

Many thanks



Roger Carlson said:
You have to reference the form THROUGH the main form. In general, it looks
like this:

forms!mainform!subformControl.Form!Control

or in your case:
Forms!MainForm![View Personal Details].Form![Last Name]

Now, this assumes that the subform and the subform *control* (that is the
control object on the main form that holds the subform) are both named "View
Personal Details".

On my website (www.rogersaccesslibrary.com), is a small Access database
sample called "SubformReference.mdb" which illustrates a number of issues
with referencing subforms and subsubforms.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L




I've tried to read through and follow previous threads on related issues,
but
unfortunalty still can't my prob resolved. I suspect I am missing
something
basic.

1) I have a form, with an event "on Click" that opens another form and
selects the relavent data from the first firm, using the condition
[Personal Details]![Last Name]=[Forms]![View Personal Details]![Last Name]

However when this form becomes a sub-form it then dosn't work.
What changes do I need to make? and where?

2) I have another form, with sub-form but keep getting the message "The
LinkMasterFields property setting has produced this error:......"

The Main form has a Primary Key on "Event Ref" and has a One-to-many
relationship with the "Attendees" Sub form. Attendeeds has two Primary
Keys
on Event Ref: and Email address.

The Link Child / Master propertys seem to be set to link between "Event
Ref:" in the two fields, but I still get the error.

Any pointers / tips on these probs would be much appreciated.

Many thanks

Winger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top