Unanswered: Writing values to fields based on other values=Forms Access 2007
I have a Main Form(accounts requested to call on) w/SF1(managers approval) and SF2(accounts being called on). If I can get this to work - the SF2 will be hidden.
I want SF2 field values to fill in based on the account request that you can see on the main form. I have a date field and an "approved" checkbox on SF1. If the Request (SF1) is approved, then I need SF2 to create a new record filling in it's fields
Main Form is called RequestResp2611 - opens to the record I asked for/all locked
Subform1 is called RQTsfApp2611 - opens to new record/this is the data entry
Subform 2 (which is on the main form, not in the subform) is called RequestRespsfREGupdate - opens to new record
The problem is that SF1 relates to Main Form, and SF2 relates to Main Form...but I need SF2 to trigger based on SF1.
I put in an Activate in the main form so that SF2 will be current....but can't get this code to work....I'm getting can't go to specified record (needs to open to new) and none of the fields fill in:
Public Sub Form_Current()
DoCmd.GoToRecord , , acNewRec
If Forms!RequestResp2611!RQTsfApp2611.Form!RQTAPPROVE D = -1 Then
Me.DATE = Forms!RequestResp2611!RQTsfApp2611.Form!MGRDATE
Me.STATLU = Me.Parent!STATLU
Me.SLU = Me.Parent!RSLMNRQT
Me.SLU2 = Me.Parent!RSLMNRQT2
In the after update of the checkbox on SF1...I have a msgbox, which works:
Private Sub RQTAPPROVED_AfterUpdate()
If RQTAPPROVED = -1 Then
MsgBox "You've approved a request. Account has been reassigned to the new salesman!"
How can I get these 2 to communicate?
Any help will be much appreciated! Thank you