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  

Subform question



 
 
Thread Tools Display Modes
  #1  
Old April 9th, 2010, 07:30 PM posted to microsoft.public.access.forms
chad
external usenet poster
 
Posts: 631
Default Subform question

I have a form (Form1) that contains a subform (Subform1).

Within this subform I have a combo box which, depending on what is chosen,
pops up another form (Popup1)for additional information. I need this
additional information in the form that pops up to be 'linked' with the
subform.

The problem I am running into is that when the user enters information in
Popup1, the table has not been populated witht he data that is in the subform
so there is no record to 'link' to. What is the best way to force te
esubform to pass its information to the table?

Thanks in advance
  #2  
Old April 9th, 2010, 07:55 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Subform question

Chad

It all starts with the data ... and you're describing forms ...

Where are you keeping your data? In the same Access file as the forms? In
a "split" Access ("back-end") file? In a SQL-Server database?

In the first two situations, I believe that as soon as you "dirty" the
subform record, you are writing to the table behind the subform. Note that
this is based on two assumptions: 1) your subform is bound to an underlying
table/query; 2) the combobox that pops up the additional form is NOT the
first field used on the subform.

You haven't described your data and structure. If you provide a bit more
specific description, folks here may be able to offer a bit more specific
suggestions.

Good luck!

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.

"Chad" wrote in message
...
I have a form (Form1) that contains a subform (Subform1).

Within this subform I have a combo box which, depending on what is chosen,
pops up another form (Popup1)for additional information. I need this
additional information in the form that pops up to be 'linked' with the
subform.

The problem I am running into is that when the user enters information in
Popup1, the table has not been populated witht he data that is in the
subform
so there is no record to 'link' to. What is the best way to force te
esubform to pass its information to the table?

Thanks in advance



  #3  
Old April 9th, 2010, 08:12 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Subform question

On Fri, 9 Apr 2010 11:30:01 -0700, Chad
wrote:

The problem I am running into is that when the user enters information in
Popup1, the table has not been populated witht he data that is in the subform
so there is no record to 'link' to. What is the best way to force te
esubform to pass its information to the table?


In the code which pops up the form, include the line

If Me.Dirty Then Me.Dirty = False

before the openform step.
--

John W. Vinson [MVP]
  #4  
Old April 12th, 2010, 03:48 PM posted to microsoft.public.access.forms
chad
external usenet poster
 
Posts: 631
Default Subform question

Perfect. Thanks!

"John W. Vinson" wrote:

On Fri, 9 Apr 2010 11:30:01 -0700, Chad
wrote:

The problem I am running into is that when the user enters information in
Popup1, the table has not been populated witht he data that is in the subform
so there is no record to 'link' to. What is the best way to force te
esubform to pass its information to the table?


In the code which pops up the form, include the line

If Me.Dirty Then Me.Dirty = False

before the openform step.
--

John W. Vinson [MVP]
.

 




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 09:13 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.