Data to subform & back after save

Status
Not open for further replies.

MayaMana

Registered User.
Local time
Today, 14:15
Joined
May 29, 2012
Messages
60
On my main form I have two subforms which are invisible to the operator but are used to pull up the last two records from different tables. The operator enters in the new record on the main form.
I am trying to make it so that after they click save it updates to last two records again. However I cannot seem to figure out how to get the subforms to refresh on Save. I have tried using:
Me.subformname.SetFocus
DoCmd.GoToRecord , , acLast
Me.mainformname.SetFocus
But it doesn't work. Currently I have it so that when the user clicks save it transfers the data from one text box to the next for the last two and nulls the one for the operator to enter in a new one. It is faulty though. I would like to be able to close the form and reopen it after clicking the save but I haven't been able to find a way to do so. Any help/advice would be greatly appreciated. Thanks.
 
I have tried that without success also.
 
if the subforms are invisible where are you using the last 2 records values??, in a control?? other form? please clarify
 
Ended up getting it to work.
I had to add in to make the value save on the subform rather then to the table for this to work.

The operator needs to be able to see the last two values that where entered in. Without clogging up the main table this was the easiest way I knew how to relate that back to them. The last two records are saveing from new entered > entered2 > entered3 on a table for a subform (which is only used for this). I have the subform pulling up the last record it has saved (which shows the last two for each) then I have that setting a control/textbox on the main form so that the operator can view it.
 
Last edited:
Status
Not open for further replies.

Users who are viewing this thread

Back
Top Bottom