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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|