update a form from subform

hoda64

Registered User.
Local time
Today, 11:13
Joined
Jun 18, 2008
Messages
30
Hello,

I have a main form that can be updated using a subform. The subform has check boxes and when they are checked/unchecked the main form will change its status.

My subform is called frmStatusDetails and the main form is called SchedView. In SchedView, SchedStatus is a box on the form that lets the user know the approval status of a case. SchedStatus can change from "Approved" to "Unapproved-PM" "Unapproved-LB"...and other different types of Unapprove that I have specified.

This is only part of my code, but the rest follows the same logic:

Code:
If Forms!SchedView!SchedStatus = "Approved" Then 'status is approved
    If chkPM.Value = 0 Then 'check pm is one of the checkboxes
        MsgBox " the PM has not approved", vbOKOnly
    
        Forms!SchedView!SchedStatus = "Unapproved-PM" 'change status
    End If
...more code for other conditions
End If

The code is part of the subform, frmStatusDetails and I have the code to be the event procedure for the "after update" property of the check boxes.

Am I calling the main form incorrectly from the subform?

Thanks for your help
 
Ok, I think I should clarify that I am a novice to Microsoft Access and I am kind of learning this as I go, so please forgive me if I did not completely understand your post.

Are you referring to the relationships that are set up within the tables, like the one to many, many to many or many to one? I did not set up any of those relationships or tables (I was given this database to update a little as a summer intern) but I think the data that is related to both the main form and the subform are all in one table. The other tables that go to that table are connected in a 1 to many relationship.

Thank you for taking the time to try to answer my question
 

Users who are viewing this thread

Back
Top Bottom