I have an Access database that I inherited and am trying to add some search functionality to it. This is simply a database that holds patient records such as name, address, phone etc. What I want to do is search by last name and have the rest of the form populate with the information.
It may be worth noting that, for some reason, there is a lock on the desktop icon and when I go to the "form" portion of access to design a form, I am not able to access that as the "design" link is gray shaded. Not sure if these two things are related or not. Right now, there is a single form with nothing but textboxes and a couple of dropdowns. I want to use the "last name" text box to search the table and then populate all other fields. Maybe by using one of the function keys or something like that.
This is the query that works but I have no idea how to tie this into the form. When I run this by itself, I get a dialog box that pops up and I can get the results in tabular format. Again, what I would like is to tie this query into my form.
SELECT tblPatient.LName AS [Last], tblPatient.FName AS [First], tblPatient.PIDNO AS [Patient No], tblPatient.Expiration
FROM tblPatient
WHERE (((tblPatient.LName)=[Enter Last Name]));