Hello everyone,
I am new to MS Access and I'm stuck on a problem with searching multi-valued fields. I am hoping for some guidance on the correct way to solve this.
My Goal:
I am building a database to track project details. A key requirement is that some fields, like Sensors and Activities, must store multiple selections for a single project.
My Setup:
I have a main table with several multi-valued fields. These were created using the Lookup Wizard and are based on simple lookup tables (e.g., a Sensors table with SensorID and SensorName).
The data entry part works perfectly. I can create a new project, select multiple sensors (e.g., "IMU Data" and "Vicon") from a checkbox list, and it saves correctly.
The Problem I Am Facing:
I am completely stuck trying to create a search form. My goal is to allow a user to select one or more sensors from a multi-select list box on a search form, and then display all projects that use any of the selected sensors.
For example, if the user selects "Vicon", the form should show all projects that used a "Vicon" sensor, even if they also used other sensors.
I tried to add criteria directly to the form's source query, like this:
Like "*" & [Forms]![Search_Form]![lstSensors] & "*"
When I do this, I get an "Enter Parameter Value" pop-up for the list box control on my form. I understand that Access cannot read the selections from a multi-select list box this way.
My Question:
What is the correct method to create a search form to retrieve the data from a multi-valued field column similar to the other simple text column?
Also want to know, whether it possible to do something like this in MS Access as I am not able to find any related videos regarding this specific requirement, which specifically shows how to retrieve the information in the search form using Multifield combo box. I would really appreciate your guidance on this unique problem.
I would really appreciate your guidance on this. Thank you!
I am new to MS Access and I'm stuck on a problem with searching multi-valued fields. I am hoping for some guidance on the correct way to solve this.
My Goal:
I am building a database to track project details. A key requirement is that some fields, like Sensors and Activities, must store multiple selections for a single project.
My Setup:
I have a main table with several multi-valued fields. These were created using the Lookup Wizard and are based on simple lookup tables (e.g., a Sensors table with SensorID and SensorName).
The data entry part works perfectly. I can create a new project, select multiple sensors (e.g., "IMU Data" and "Vicon") from a checkbox list, and it saves correctly.
The Problem I Am Facing:
I am completely stuck trying to create a search form. My goal is to allow a user to select one or more sensors from a multi-select list box on a search form, and then display all projects that use any of the selected sensors.
For example, if the user selects "Vicon", the form should show all projects that used a "Vicon" sensor, even if they also used other sensors.
I tried to add criteria directly to the form's source query, like this:
Like "*" & [Forms]![Search_Form]![lstSensors] & "*"
When I do this, I get an "Enter Parameter Value" pop-up for the list box control on my form. I understand that Access cannot read the selections from a multi-select list box this way.
My Question:
What is the correct method to create a search form to retrieve the data from a multi-valued field column similar to the other simple text column?
Also want to know, whether it possible to do something like this in MS Access as I am not able to find any related videos regarding this specific requirement, which specifically shows how to retrieve the information in the search form using Multifield combo box. I would really appreciate your guidance on this unique problem.
I would really appreciate your guidance on this. Thank you!