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 data entry
I have a sub-form (continuous forms) and on the main form there is a button
that opens a seperate Data Entry Form. On the Data Entry Form there is a standard Close button. Once the Data Entry Form closes - the underlying table doesn't update. Is this because the button that opens the Data Entry Form is on the main form instead of the sub-form? If so, can anyone suggest a solution (other than moving the button that opens the Data Entry Form)? Thanks in anticipation. Regards, John. |
#2
|
|||
|
|||
Sub-Form data entry
In the Data Entry Form make some changes in the code behind the Close
button. Add the following before the form closes: If Me.Dirty = True Then Me.Dirty = False 'saves the record Forms!MainFormName!SubformControlName.Form.Requery of course you will need to substitute your main form name and your subform control name. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "John S" wrote in message ... I have a sub-form (continuous forms) and on the main form there is a button that opens a seperate Data Entry Form. On the Data Entry Form there is a standard Close button. Once the Data Entry Form closes - the underlying table doesn't update. Is this because the button that opens the Data Entry Form is on the main form instead of the sub-form? If so, can anyone suggest a solution (other than moving the button that opens the Data Entry Form)? Thanks in anticipation. Regards, John. |
#3
|
|||
|
|||
Sub-Form data entry
Thanks Arvin:
I tried that - I'm still getting the message "You cannot edit or change a record because a related record is required in [mainform]". Regards, John. "Arvin Meyer [MVP]" wrote: In the Data Entry Form make some changes in the code behind the Close button. Add the following before the form closes: If Me.Dirty = True Then Me.Dirty = False 'saves the record Forms!MainFormName!SubformControlName.Form.Requery of course you will need to substitute your main form name and your subform control name. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "John S" wrote in message ... I have a sub-form (continuous forms) and on the main form there is a button that opens a seperate Data Entry Form. On the Data Entry Form there is a standard Close button. Once the Data Entry Form closes - the underlying table doesn't update. Is this because the button that opens the Data Entry Form is on the main form instead of the sub-form? If so, can anyone suggest a solution (other than moving the button that opens the Data Entry Form)? Thanks in anticipation. Regards, John. . |
#4
|
|||
|
|||
Sub-Form data entry
Hmmm? Did you mention that message before?
Access is telling you that you can't enter a "child" record until you've indicated its "parent". Are you using the "parent" and "child" properties of the subform control on your main form to tell the subform the "parent" to which the "child" records belong? -- Regards Jeff Boyce Microsoft Access MVP Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "John S" wrote in message news Thanks Arvin: I tried that - I'm still getting the message "You cannot edit or change a record because a related record is required in [mainform]". Regards, John. "Arvin Meyer [MVP]" wrote: In the Data Entry Form make some changes in the code behind the Close button. Add the following before the form closes: If Me.Dirty = True Then Me.Dirty = False 'saves the record Forms!MainFormName!SubformControlName.Form.Requery of course you will need to substitute your main form name and your subform control name. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "John S" wrote in message ... I have a sub-form (continuous forms) and on the main form there is a button that opens a seperate Data Entry Form. On the Data Entry Form there is a standard Close button. Once the Data Entry Form closes - the underlying table doesn't update. Is this because the button that opens the Data Entry Form is on the main form instead of the sub-form? If so, can anyone suggest a solution (other than moving the button that opens the Data Entry Form)? Thanks in anticipation. Regards, John. . |
#5
|
|||
|
|||
Sub-Form data entry
Hmmm? Did you mention that message before?
Access is telling you that you can't enter a "child" record until you've indicated its "parent". Are you using the "parent" and "child" properties of the subform control on your main form to tell the subform the "parent" to which the "child" records belong? -- Regards Jeff Boyce Microsoft Access MVP Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "John S" wrote in message news Thanks Arvin: I tried that - I'm still getting the message "You cannot edit or change a record because a related record is required in [mainform]". Regards, John. "Arvin Meyer [MVP]" wrote: In the Data Entry Form make some changes in the code behind the Close button. Add the following before the form closes: If Me.Dirty = True Then Me.Dirty = False 'saves the record Forms!MainFormName!SubformControlName.Form.Requery of course you will need to substitute your main form name and your subform control name. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "John S" wrote in message ... I have a sub-form (continuous forms) and on the main form there is a button that opens a seperate Data Entry Form. On the Data Entry Form there is a standard Close button. Once the Data Entry Form closes - the underlying table doesn't update. Is this because the button that opens the Data Entry Form is on the main form instead of the sub-form? If so, can anyone suggest a solution (other than moving the button that opens the Data Entry Form)? Thanks in anticipation. Regards, John. . |
#6
|
|||
|
|||
Sub-Form data entry
Hmmm? Did you mention that message before?
Access is telling you that you can't enter a "child" record until you've indicated its "parent". Are you using the "parent" and "child" properties of the subform control on your main form to tell the subform the "parent" to which the "child" records belong? -- Regards Jeff Boyce Microsoft Access MVP Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "John S" wrote in message news Thanks Arvin: I tried that - I'm still getting the message "You cannot edit or change a record because a related record is required in [mainform]". Regards, John. "Arvin Meyer [MVP]" wrote: In the Data Entry Form make some changes in the code behind the Close button. Add the following before the form closes: If Me.Dirty = True Then Me.Dirty = False 'saves the record Forms!MainFormName!SubformControlName.Form.Requery of course you will need to substitute your main form name and your subform control name. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "John S" wrote in message ... I have a sub-form (continuous forms) and on the main form there is a button that opens a seperate Data Entry Form. On the Data Entry Form there is a standard Close button. Once the Data Entry Form closes - the underlying table doesn't update. Is this because the button that opens the Data Entry Form is on the main form instead of the sub-form? If so, can anyone suggest a solution (other than moving the button that opens the Data Entry Form)? Thanks in anticipation. Regards, John. . |
#7
|
|||
|
|||
Sub-Form data entry
Jeff,
Sorry - yes - the sub-form is the many side of a one-to-many relationship. You've hit the nail on the head! Is there an easy way to update the 'one' side field (ie main form/table) from my Data Entry form? Regards, John. "Jeff Boyce" wrote: Hmmm? Did you mention that message before? Access is telling you that you can't enter a "child" record until you've indicated its "parent". Are you using the "parent" and "child" properties of the subform control on your main form to tell the subform the "parent" to which the "child" records belong? -- Regards Jeff Boyce Microsoft Access MVP Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "John S" wrote in message news Thanks Arvin: I tried that - I'm still getting the message "You cannot edit or change a record because a related record is required in [mainform]". Regards, John. "Arvin Meyer [MVP]" wrote: In the Data Entry Form make some changes in the code behind the Close button. Add the following before the form closes: If Me.Dirty = True Then Me.Dirty = False 'saves the record Forms!MainFormName!SubformControlName.Form.Requery of course you will need to substitute your main form name and your subform control name. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "John S" wrote in message ... I have a sub-form (continuous forms) and on the main form there is a button that opens a seperate Data Entry Form. On the Data Entry Form there is a standard Close button. Once the Data Entry Form closes - the underlying table doesn't update. Is this because the button that opens the Data Entry Form is on the main form instead of the sub-form? If so, can anyone suggest a solution (other than moving the button that opens the Data Entry Form)? Thanks in anticipation. Regards, John. . . |
#8
|
|||
|
|||
Sub-Form data entry
Jeff,
Sorry - yes - the sub-form is the many side of a one-to-many relationship. You've hit the nail on the head! Is there an easy way to update the 'one' side field (ie main form/table) from my Data Entry form? Regards, John. "Jeff Boyce" wrote: Hmmm? Did you mention that message before? Access is telling you that you can't enter a "child" record until you've indicated its "parent". Are you using the "parent" and "child" properties of the subform control on your main form to tell the subform the "parent" to which the "child" records belong? -- Regards Jeff Boyce Microsoft Access MVP Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "John S" wrote in message news Thanks Arvin: I tried that - I'm still getting the message "You cannot edit or change a record because a related record is required in [mainform]". Regards, John. "Arvin Meyer [MVP]" wrote: In the Data Entry Form make some changes in the code behind the Close button. Add the following before the form closes: If Me.Dirty = True Then Me.Dirty = False 'saves the record Forms!MainFormName!SubformControlName.Form.Requery of course you will need to substitute your main form name and your subform control name. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "John S" wrote in message ... I have a sub-form (continuous forms) and on the main form there is a button that opens a seperate Data Entry Form. On the Data Entry Form there is a standard Close button. Once the Data Entry Form closes - the underlying table doesn't update. Is this because the button that opens the Data Entry Form is on the main form instead of the sub-form? If so, can anyone suggest a solution (other than moving the button that opens the Data Entry Form)? Thanks in anticipation. Regards, John. . . |
#9
|
|||
|
|||
Sub-Form data entry
Jeff,
Sorry - yes - the sub-form is the many side of a one-to-many relationship. You've hit the nail on the head! Is there an easy way to update the 'one' side field (ie main form/table) from my Data Entry form? Regards, John. "Jeff Boyce" wrote: Hmmm? Did you mention that message before? Access is telling you that you can't enter a "child" record until you've indicated its "parent". Are you using the "parent" and "child" properties of the subform control on your main form to tell the subform the "parent" to which the "child" records belong? -- Regards Jeff Boyce Microsoft Access MVP Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "John S" wrote in message news Thanks Arvin: I tried that - I'm still getting the message "You cannot edit or change a record because a related record is required in [mainform]". Regards, John. "Arvin Meyer [MVP]" wrote: In the Data Entry Form make some changes in the code behind the Close button. Add the following before the form closes: If Me.Dirty = True Then Me.Dirty = False 'saves the record Forms!MainFormName!SubformControlName.Form.Requery of course you will need to substitute your main form name and your subform control name. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "John S" wrote in message ... I have a sub-form (continuous forms) and on the main form there is a button that opens a seperate Data Entry Form. On the Data Entry Form there is a standard Close button. Once the Data Entry Form closes - the underlying table doesn't update. Is this because the button that opens the Data Entry Form is on the main form instead of the sub-form? If so, can anyone suggest a solution (other than moving the button that opens the Data Entry Form)? Thanks in anticipation. Regards, John. . . |
#10
|
|||
|
|||
Sub-Form data entry
"John S" wrote in message news Jeff, Sorry - yes - the sub-form is the many side of a one-to-many relationship. You've hit the nail on the head! Is there an easy way to update the 'one' side field (ie main form/table) from my Data Entry form? If the data entry form is bound to the subform's table, as is the usual case, the answer is no. Why would you want to enter data on the many-side without a one-side record? That's like a doctor creating an operation when he hasn't contacted the patient yet. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com |
Thread Tools | |
Display Modes | |
|
|