A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sub Form Problems



 
 
Thread Tools Display Modes
  #1  
Old November 8th, 2006, 08:51 AM posted to microsoft.public.access.forms
Winger
external usenet poster
 
Posts: 13
Default Sub Form Problems

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


  #2  
Old November 8th, 2006, 09:53 AM posted to microsoft.public.access.forms
Winger
external usenet poster
 
Posts: 13
Default Sub Form Problems

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




"Winger" wrote:

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


  #3  
Old November 8th, 2006, 02:07 PM posted to microsoft.public.access.forms
Roger Carlson
external usenet poster
 
Posts: 222
Default Sub Form Problems

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/...UBED1=ACCESS-L




"Winger" wrote in message
...
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




  #4  
Old November 8th, 2006, 04:00 PM posted to microsoft.public.access.forms
Winger
external usenet poster
 
Posts: 13
Default Sub Form Problems

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" wrote:

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/...UBED1=ACCESS-L




"Winger" wrote in message
...
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





  #5  
Old November 8th, 2006, 08:58 PM posted to microsoft.public.access.forms
Winger
external usenet poster
 
Posts: 13
Default Sub Form Problems

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" wrote:

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/...UBED1=ACCESS-L




"Winger" wrote in message
...
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





  #6  
Old November 9th, 2006, 01:12 PM posted to microsoft.public.access.forms
Roger Carlson
external usenet poster
 
Posts: 222
Default Sub Form Problems

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/...UBED1=ACCESS-L


"Winger" wrote in message
...
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" wrote:

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/...UBED1=ACCESS-L




"Winger" wrote in message
...
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







  #7  
Old November 9th, 2006, 03:11 PM posted to microsoft.public.access.forms
Winger
external usenet poster
 
Posts: 13
Default Sub Form Problems

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" wrote:

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/...UBED1=ACCESS-L


"Winger" wrote in message
...
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" wrote:

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/...UBED1=ACCESS-L




"Winger" wrote in message
...
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








 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:40 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.