Hello. I have the following code on a form and all is working but one feature. When I make the detail visible if it finds the application ID entered, it displays all the table results and I want it to just display the application ID entered. Is this a simple fix?
Private Sub txtApplicationID_AfterUpdate()
If DCount("[ApplID]", "tblDQPerson", "[ApplID]= '" & Me.txtApplicationID & "'") > 0 Then
If DCount("[ApplID]", "tblDQPersonGrowthAttainHS", "[ApplID]= '" & Me.txtApplicationID & "'") <> 0 Then
MsgBox "Application ID found, proceed to update the High School Growth Attainment."
Me.Detail.Visible = True
Else
MsgBox "The Application ID is in the database but there is not a High School Growth Attainment tied to it to update. Enter a different Application ID or go to the ADD menu to create an entry for the Application ID entered."
End If
Else
MsgBox "That Application ID entered is not in the database, enter a different Application ID."
Me.txtApplicationID = " "
DoCmd.RefreshRecord
End If
End Sub