I have a standard form called "Case Information" that displays data from a in text fields. I also included one extra field "Search Case Number" with a button to allow users to search the database and display that record on the "Case Information" form.
When the user clicks the search button, it runs the query "qrySearchCasesbyCaseNumber". If no record is found, it displays a MsgBox. If the record is found, I want it to display that record on the form. Right now it does nothing. Not sure if I need to use OpenForm, FindRecord, or what. Below is my code:
Private Sub Search_Case_Number_button_Click()
If DCount("[Case Number]", "qrySearchCasesbyCaseNumber") > 0 Then
'How do I display the record in the form here?
[url removed, login to view] "Case Information"
MsgBox "The Case Number was not found."
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.