I have an application that uses a tabbed form with several tables that are linked together is a set. The tables are as follows:
Contact (The parent table)
+ Activities (Linked to Contact by ContactID)
+ Documents (Linked to Contact by ContactID)
+ Counts (Linked to Contact by ContactID)
The tabbed form has a tab for each table. ContactID is setup to auto-increment in the field rules for the Contact table. This works fine.
The Activities tab contains a browse called Activities_BR (a browse for the activities table). There is one button on this tab. The OnPush event for this button calls new_record(). When I do this the ContactID in the Activities table is automatically set to the corresponding contactID value in the Contact table. This is the desired action.
The Documents tab is essentially the same as the Activities tab and works fine.
The problem is with the Counts Tab. It is structured slightly different.
The counts tab contains a browse called Counts_BR (a browse for the counts table). There is one button on this tab. The OnPush event for this tab opens a form called "Counts". The form appears to be in record entry mode. This form has various fields corresponding to the Counts table, including CountID and the linking field ContactID.
The problem I'm having is: When I press this button I'm expecting the ContactID to be automatically populated with the ContactID from the Contact table like it does with the Activities and Documents tables. The obvious difference here is the fact that I'm not directly entering the data into a browse but insetead opening a form to populate the table so it can be viewed in the browse later. Why doesn't the ContactID get automatically entered into the Counts table like it does with the Activities? How do I get that to happen?
I'm missing something?!? Any help would be greatly appreciated.
Thanks in advance to anyone who can help!!!
Contact (The parent table)
+ Activities (Linked to Contact by ContactID)
+ Documents (Linked to Contact by ContactID)
+ Counts (Linked to Contact by ContactID)
The tabbed form has a tab for each table. ContactID is setup to auto-increment in the field rules for the Contact table. This works fine.
The Activities tab contains a browse called Activities_BR (a browse for the activities table). There is one button on this tab. The OnPush event for this button calls new_record(). When I do this the ContactID in the Activities table is automatically set to the corresponding contactID value in the Contact table. This is the desired action.
The Documents tab is essentially the same as the Activities tab and works fine.
The problem is with the Counts Tab. It is structured slightly different.
The counts tab contains a browse called Counts_BR (a browse for the counts table). There is one button on this tab. The OnPush event for this tab opens a form called "Counts". The form appears to be in record entry mode. This form has various fields corresponding to the Counts table, including CountID and the linking field ContactID.
The problem I'm having is: When I press this button I'm expecting the ContactID to be automatically populated with the ContactID from the Contact table like it does with the Activities and Documents tables. The obvious difference here is the fact that I'm not directly entering the data into a browse but insetead opening a form to populate the table so it can be viewed in the browse later. Why doesn't the ContactID get automatically entered into the Counts table like it does with the Activities? How do I get that to happen?
I'm missing something?!? Any help would be greatly appreciated.
Thanks in advance to anyone who can help!!!
Comment