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  

Linked Form Problems



 
 
Thread Tools Display Modes
  #1  
Old June 17th, 2009, 11:30 AM posted to microsoft.public.access.forms
Yodaboy
external usenet poster
 
Posts: 2
Default Linked Form Problems

Hi,

Can anybody help me with the following;
I have a form which holds requisition number data and a brief description. A
second form called "Codes" which holds cost code information related to the
requisition header form and "Codes" also has a subform which allocates school
names to each cost code.

My problem is then when I try to complete the header form then click a
button to start completing the information on "Codes" the "codes" form
doesn't have the ReqID from the header form. They are nested fine in the
table layout and I have relationships from each of the forms. I have tried to
add both a toggle button and then tried a command button to open the second
form with the same Requisition ID as the header form but I cant get it to
work, can anybody help me? I'm going crazy!!
  #2  
Old June 17th, 2009, 01:51 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Linked Form Problems

Forms have no knowledge of your table relationships. If it is a
form/subform, then you use the Link Master and Link Child fields properties
of the subform control to establish the relationship. If it is two separate
forms, you can use the Where argument of the OpenForm method to cause the
form to open on a specific record or you can pass the value to the second
form using the OpenArgs argument and let the second form find the correct
record.
--
Dave Hargis, Microsoft Access MVP


"Yodaboy" wrote:

Hi,

Can anybody help me with the following;
I have a form which holds requisition number data and a brief description. A
second form called "Codes" which holds cost code information related to the
requisition header form and "Codes" also has a subform which allocates school
names to each cost code.

My problem is then when I try to complete the header form then click a
button to start completing the information on "Codes" the "codes" form
doesn't have the ReqID from the header form. They are nested fine in the
table layout and I have relationships from each of the forms. I have tried to
add both a toggle button and then tried a command button to open the second
form with the same Requisition ID as the header form but I cant get it to
work, can anybody help me? I'm going crazy!!

  #3  
Old June 17th, 2009, 02:02 PM posted to microsoft.public.access.forms
Yodaboy
external usenet poster
 
Posts: 2
Default Linked Form Problems

Thanks for your reply. i have now attached the "codes" form to the header
form as a subform but they are both huge forms due to the details. i really
wanted to be able to opne the "Codes" form as a seperate form is there any
code I can use which will open the subform as its own from and then on
closing returns to the header form.

Thanks again.

"Klatuu" wrote:

Forms have no knowledge of your table relationships. If it is a
form/subform, then you use the Link Master and Link Child fields properties
of the subform control to establish the relationship. If it is two separate
forms, you can use the Where argument of the OpenForm method to cause the
form to open on a specific record or you can pass the value to the second
form using the OpenArgs argument and let the second form find the correct
record.
--
Dave Hargis, Microsoft Access MVP


"Yodaboy" wrote:

Hi,

Can anybody help me with the following;
I have a form which holds requisition number data and a brief description. A
second form called "Codes" which holds cost code information related to the
requisition header form and "Codes" also has a subform which allocates school
names to each cost code.

My problem is then when I try to complete the header form then click a
button to start completing the information on "Codes" the "codes" form
doesn't have the ReqID from the header form. They are nested fine in the
table layout and I have relationships from each of the forms. I have tried to
add both a toggle button and then tried a command button to open the second
form with the same Requisition ID as the header form but I cant get it to
work, can anybody help me? I'm going crazy!!

  #4  
Old June 17th, 2009, 02:06 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Linked Form Problems

If you open the codes form from you first form and then close it, it will
return the focus to the first form.
--
Dave Hargis, Microsoft Access MVP


"Yodaboy" wrote:

Thanks for your reply. i have now attached the "codes" form to the header
form as a subform but they are both huge forms due to the details. i really
wanted to be able to opne the "Codes" form as a seperate form is there any
code I can use which will open the subform as its own from and then on
closing returns to the header form.

Thanks again.

"Klatuu" wrote:

Forms have no knowledge of your table relationships. If it is a
form/subform, then you use the Link Master and Link Child fields properties
of the subform control to establish the relationship. If it is two separate
forms, you can use the Where argument of the OpenForm method to cause the
form to open on a specific record or you can pass the value to the second
form using the OpenArgs argument and let the second form find the correct
record.
--
Dave Hargis, Microsoft Access MVP


"Yodaboy" wrote:

Hi,

Can anybody help me with the following;
I have a form which holds requisition number data and a brief description. A
second form called "Codes" which holds cost code information related to the
requisition header form and "Codes" also has a subform which allocates school
names to each cost code.

My problem is then when I try to complete the header form then click a
button to start completing the information on "Codes" the "codes" form
doesn't have the ReqID from the header form. They are nested fine in the
table layout and I have relationships from each of the forms. I have tried to
add both a toggle button and then tried a command button to open the second
form with the same Requisition ID as the header form but I cant get it to
work, can anybody help me? I'm going crazy!!

 




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 10:20 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.