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 data entry



 
 
Thread Tools Display Modes
  #1  
Old December 1st, 2009, 11:40 AM posted to microsoft.public.access.forms
john s
external usenet poster
 
Posts: 50
Default 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  
Old December 1st, 2009, 12:07 PM posted to microsoft.public.access.forms
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default 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  
Old December 1st, 2009, 01:09 PM posted to microsoft.public.access.forms
john s
external usenet poster
 
Posts: 50
Default 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  
Old December 1st, 2009, 02:46 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 1,555
Default 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  
Old December 1st, 2009, 02:46 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 1,555
Default 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  
Old December 1st, 2009, 02:46 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 1,555
Default 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  
Old December 1st, 2009, 04:25 PM posted to microsoft.public.access.forms
john s
external usenet poster
 
Posts: 50
Default 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  
Old December 1st, 2009, 04:25 PM posted to microsoft.public.access.forms
john s
external usenet poster
 
Posts: 50
Default 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  
Old December 1st, 2009, 04:25 PM posted to microsoft.public.access.forms
john s
external usenet poster
 
Posts: 50
Default 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  
Old December 2nd, 2009, 01:40 AM posted to microsoft.public.access.forms
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default 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

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 08:07 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.