Hello,
I have created a main form which has a number of tabbed sub forms linked. I have used following code to filter users so only their details appear on the forms:
Code:
Private Sub Find_Pupil_Click()
Dim sSurname As String
Dim sRegClass As String
sUser = Me.txtSurname
sPassword = Me.txtRegClass
If DCount("*", "T_Pupil_Information", "Username = '" & sUser & "' And Password = '" & sPassword & "'") = 0 Then
MsgBox "Incorrect User Details! Please re-enter your details", vbExclamation, ""
Else
DoCmd.OpenReport "F_Pupil_Profile", , , "[Username] = '" & Me.txtUserName & "'"
End If
End Sub
All the fields on the form F_Pupil_Profile update appropriately. However, the sub forms do not update, they just hold the details of the first record located in table T_Pupil_Information.
Does anyone know how I can also update the sub form details so they are linked to the appropriate user?
Regards
Macftm