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