Linking form to Subform

rkhondas2000

New Member
Joined
Jul 13, 2015
Messages
8
Good Afternoon,

Im sure this is fairly easy but have been having issues trying to link the forms. I currently have a main form, which ask for the department and date. I then created a subfolder which ask 4 detailed questions. This subform is in a datasheet view since the user can enter multiple records to the table. What i want to do is once they hit submit, for the table to get updated with the records from both the subform and form. Currently, the subform will become populate the table, but under date and department, the table is blank. Is there a way to link these two so if they select a specific dept/date, then each row they entered with information will auto populate on the table?

Thanks in advance.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
a bit confused...
theres no need for a Submit button because the subform enters data directly into the table.
If it isnt, then you did not link your subform.
In the property of the subform , data tab, :
link master fields
link child field

these are to be set to the keys in the master table.
Then you can enter data directly into the table.
 
Upvote 0
Actually seem to have gotten it to work. The only problem is when I hit the refresh button or submit, the table gets updated with the correct records but it also gets updated with the department and date record with the other columns blank. Is there a way for it not to record the initial form selections as a record and just use the subform answers?
 
Upvote 0
Yes you are correct. The submit button isnt necessary, but I just use it as a refresh button. That will clear all their information since they enter the information daily but in some cases, might need to enter 2-3 days of information. So in this case, they will enter the date/departmetn, answer the questions and then hit submit. Clears the information and they can enter a new date/dept.

The link master fields/child field worked like a charm. This is what is happening now.

Date# of PositionsType of PositionHours FlexedPotential Overtime-Employee Name and ShiftDepartment
7/28/20153Register Nurses:3JohnSouth
7/28/2015



South
7/30/2015



South
7/30/20152Transporter2MichelleSouth
7/30/20155CLERICAL5TonySouth
7/30/2015



North
7/30/20152EVS5JacobNorth
<CAPTION></CAPTION> <THEAD>
</THEAD><TBODY>
</TBODY><TFOOT></TFOOT>
 
Upvote 0
Do away with the "refresh" button if these form controls are bound to an updateable query or table. If you're clearing out values when doing this "refresh" which is not a refresh at all, you are deleting them from the table too. Use form navigation buttons or (more complicated) temporary tables to handle edits and data entry.
 
Upvote 0

Forum statistics

Threads
1,221,849
Messages
6,162,425
Members
451,765
Latest member
craigvan888

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top