Guidance needed creating multi-criteria search form with subform
Posted: Tue Jan 24, 2023 10:22 am
I have some basic MS Access experience having cobbled together a database for our office many years ago, and am now trying to migrate it into nuBuilder. I've successfuly transferred all the data into mySQL and have just about got the hang of building a simple search form using the formbuilder 'wizard'.
Where I am now struggling (possibly as much due to lack of database knowledge as anything else) is trying to create a search form with subform that can show results based on a number of different search criteria limited to searching specific fields.
To give an example, we inspect houses so our database has an 'instructions' table with job number and date fields. This then has a many-to-one link to a table containing all of the houses, with further linked table containing road names and postcodes. What I am trying to do is create a form where a user can type in a house number and/or road name and/or postcode which will then show all of the instructions we have ever received for that property. What I need is a 'house number' search box that only searches the house number field, and a 'road name' search box that only searches the road name field etc etc. I need this search granularity as there are many occasions where house names are the same as road names, or the same road name exists in a few postcodes such that a global search of all the fields will bring up too many results with no way of narrowing it down. In Access I had some SQL that used an 'Add To Where' clause to add any search critereia into the SQL query. Is there a similar function in nuBuilder? And how to create the text boxes for typing the search criteria into?
Any pointers or examples would be really helpful. Ultimately once I get the hang of this I would want to be able to click on an entry in the subform results which would then show further related data about that property, for example its resale prices over the years which is contained in another related table.
Where I am now struggling (possibly as much due to lack of database knowledge as anything else) is trying to create a search form with subform that can show results based on a number of different search criteria limited to searching specific fields.
To give an example, we inspect houses so our database has an 'instructions' table with job number and date fields. This then has a many-to-one link to a table containing all of the houses, with further linked table containing road names and postcodes. What I am trying to do is create a form where a user can type in a house number and/or road name and/or postcode which will then show all of the instructions we have ever received for that property. What I need is a 'house number' search box that only searches the house number field, and a 'road name' search box that only searches the road name field etc etc. I need this search granularity as there are many occasions where house names are the same as road names, or the same road name exists in a few postcodes such that a global search of all the fields will bring up too many results with no way of narrowing it down. In Access I had some SQL that used an 'Add To Where' clause to add any search critereia into the SQL query. Is there a similar function in nuBuilder? And how to create the text boxes for typing the search criteria into?
Any pointers or examples would be really helpful. Ultimately once I get the hang of this I would want to be able to click on an entry in the subform results which would then show further related data about that property, for example its resale prices over the years which is contained in another related table.