Open a form with data from another form and then update a table

Pettor

Board Regular
Joined
Aug 8, 2015
Messages
175
Hi guys, I have a new project and I need some help.

I have an Access form in a spreadsheet view that retrieves data from a table.

In one of the columns I have entered an event procedure, where when I click on the field it opens a second form with the data of the specific line of the record based on an ID field (i.e. DoCmd.OpenForm "2P_FORM", , , "[ID] = Forms![MASTER_DATA]![ID]").

Now I want to enter another event procedure inside the second form (by placing a button) that will open a third form with these exact data (i.e. DoCmd.OpenForm "2P_TRACK_frm", , , "[ID] = Forms![2P_FORM]![ID]") where I will add some more data in new fields related with this record that didn't exist in the initial table.

Finally, I want all these data (the initial and the new additions entered in the third form) to be stored in another existing table, different than the first one.

So the short story is:

a) I have a form with 1000 lines, with unique ID codes stored in a table
b) I click on a specific field of each line and only these data of the line open in a second form
c) A button in the second form should open a third form with the same data + empty fields that I will store more information
d) Finally all the new data will be stored in a new table

So far I have managed to open every new form with the selected data I want from the previous form (using the above VB codes) but I can't save them to the last table.

Any ideas on how to achieve that?

Many thanks
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
why isn't c doing the job of d? If b fields exist on c form then just add c fields to b?
Or perhaps more simply, why doesn't form a contain all of the fields?
I suspect this is a parent/related child record thing (e.g. PO and PO line items) which means you should be using subforms. Forgetting that, if you can't base all of the forms on editable queries or the tables themselves you'll have to use unbound forms and write to table(s) with code.
 
Upvote 0
Well, here is the philosophy.
The first (a) form contains the details of a number football games in sports betting.
The second (b) form is the study room of a selected game where the basic data of the first form are presented together with some calculated fields retrieving data from other queries/tables.
The third (c) form is the form where the same game is presented but without the calculated fields. This is called bet tracking form where I want for this selected game to make some comments of why I chose it.
So in the end the basic data of the game together with my final remarks need to be stored in last table.
So far I was doing it manually where I had linked the last table with a form where I was entering all the details of the game by hand (CONNECTING THE FORM WITH THE TABLE IN THE RECORDSET PROPERTY FIELD). Now I want the basic data of the game to be entered automatically, add later some more details and then all of them to be stored in the last table.
Now in order to bring the data of the second form inside the third form I have changed the recordset link with that of the second fom and no data can be stored to the old table anymore.
I assume there should be a way where all these data could be now stored in the last table.
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,117
Members
453,021
Latest member
Justyna P

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