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  

Invoke a linked form from a subform field.



 
 
Thread Tools Display Modes
  #1  
Old January 3rd, 2007, 12:07 PM posted to microsoft.public.access.forms
Paulc
external usenet poster
 
Posts: 31
Default Invoke a linked form from a subform field.

Hi all,
I'm using Access 2000

Here is my simplified problem:

I have a master form which contains SubForm1
Table1 is used in SubForm1 (in datasheet view) and has a one to many
relationship with Table2

Form2 contains Table2

When a user 'Checks' the yes/no field in subform1, i'd like Form2 to be
visible and presents the associated linked record for users to edit.

How would I achieve this?

Thank you,
Paul.




  #2  
Old January 3rd, 2007, 12:23 PM posted to microsoft.public.access.forms
Arvin Meyer [MVP]
external usenet poster
 
Posts: 4,231
Default Invoke a linked form from a subform field.

DoCmd.OpenForm "Form2",,, "IDField =" & Me.Subform1.txtIDField"

Subform1 is the Name of the subform control, IDField is the Name of the
Primary Key, txtIDField is the Name of the text box in Form2 that houses the
ID field.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Paulc" wrote in message
...
Hi all,
I'm using Access 2000

Here is my simplified problem:

I have a master form which contains SubForm1
Table1 is used in SubForm1 (in datasheet view) and has a one to many
relationship with Table2

Form2 contains Table2

When a user 'Checks' the yes/no field in subform1, i'd like Form2 to be
visible and presents the associated linked record for users to edit.

How would I achieve this?

Thank you,
Paul.






  #3  
Old January 3rd, 2007, 03:07 PM posted to microsoft.public.access.forms
Paulc
external usenet poster
 
Posts: 31
Default Invoke a linked form from a subform field.

Thanks Arvin.

followed your advice and added the forms and filed names.

The code is is invoking and error;

...."Can't find the field '|' referred to in your expression"...

I'm not convinced the ID field values are being picked up.
Have you any suggestions?

Thanks, Paul



"Arvin Meyer [MVP]" wrote:

DoCmd.OpenForm "Form2",,, "IDField =" & Me.Subform1.txtIDField"

Subform1 is the Name of the subform control, IDField is the Name of the
Primary Key, txtIDField is the Name of the text box in Form2 that houses the
ID field.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Paulc" wrote in message
...
Hi all,
I'm using Access 2000

Here is my simplified problem:

I have a master form which contains SubForm1
Table1 is used in SubForm1 (in datasheet view) and has a one to many
relationship with Table2

Form2 contains Table2

When a user 'Checks' the yes/no field in subform1, i'd like Form2 to be
visible and presents the associated linked record for users to edit.

How would I achieve this?

Thank you,
Paul.







  #4  
Old January 4th, 2007, 05:34 AM posted to microsoft.public.access.forms
Arvin Meyer [MVP]
external usenet poster
 
Posts: 4,231
Default Invoke a linked form from a subform field.

Perhaps if you posted the names of the fields and the controls, I can solve
the problem.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Paulc" wrote in message
...
Thanks Arvin.

followed your advice and added the forms and filed names.

The code is is invoking and error;

..."Can't find the field '|' referred to in your expression"...

I'm not convinced the ID field values are being picked up.
Have you any suggestions?

Thanks, Paul



"Arvin Meyer [MVP]" wrote:

DoCmd.OpenForm "Form2",,, "IDField =" & Me.Subform1.txtIDField"

Subform1 is the Name of the subform control, IDField is the Name of the
Primary Key, txtIDField is the Name of the text box in Form2 that houses
the
ID field.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Paulc" wrote in message
...
Hi all,
I'm using Access 2000

Here is my simplified problem:

I have a master form which contains SubForm1
Table1 is used in SubForm1 (in datasheet view) and has a one to many
relationship with Table2

Form2 contains Table2

When a user 'Checks' the yes/no field in subform1, i'd like Form2 to be
visible and presents the associated linked record for users to edit.

How would I achieve this?

Thank you,
Paul.









 




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:57 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.