I'm a complete rookie in Access. I have a database with one table. The table has two fields, part number and tool number.
I need to develop a user interface that will allow the user to enter a part number or a tool number and click a button to list all the entries in the table that match the number entered by the user. See the attached image, this is what I want the form to look like. The table should populate with the matching entries.
I have no idea where to start. Do I create a query or a form or a report? Any tips to tutorials or any basic help would be appreciated. Thank you for helping me.
Access 2000
Last edited by proepert; 03-09-2011 at 04:09 PM.
Here is how I would attack this.
I would first create a search form. In that search form I would put the criteria for a query that I wish to have Access look for. In the bottom of the search form, I would insert a subform that is linked to the query that you have searched.
Here is a link on how to create a search form.
http://www.datapigtechnologies.com/f...earchform.html
Here are two links on building subforms
http://www.datapigtechnologies.com/f...subforms1.html
http://www.datapigtechnologies.com/f.../subform2.html
I hope this helps you with your project. Post back if you encounter any issues.
Alan
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
Thank you very much. The video tutorials are very good. I attached my example database. When the Search button is clicked the query runs but it opens in a separate window, not in the sub-form within the main form.
I think there are two sub-forms, one was a mistake or rookie error.
Thanks for helping me.
Last edited by proepert; 03-09-2011 at 02:28 AM.
After looking at your database and thinking about it, I have what I believe is an easier and more straight forward solution.
What I would do is make the search form bound to the query. I would then put the controls you show as search criteria in the HEADER of this form. I would also make them Combos rather than just text boxes so the user can be assured of using actual data. Delete the subform and make the results a datasheet in the searchform.
Then the code behind your search button is one line:
Me.Requery
Give this a shot and see what happens.
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
I played around with your db. Look at the attached. I did not make them combos because doing so, would require two tables. One for the PartNum and one for the toolnum and I was not sure how this would play out with the overall project.
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
Thanks again Alan.
Can you explain a little more about post #4? I would like the results to show in a "datasheet" within the search form if possible.
I tried to get a datasheet but couldn't figure out how to get a datasheet and a header and therefore went to the continuous form as shown in #5. I will continue to search for an answer as time allows. You may want to do the same by doing a Google search.
Ok. Got it figured. You need to have a subform in the main form for the datasheet to work. But you need to put your search criteria in the header. Then use the me.requery on the command button.
Alan
Last edited by alansidman; 03-09-2011 at 02:44 PM.
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
Fixed the example that I showed you earlier. Here is a new presentation attached. Needed to have a subform, with the search criteria in the header. Additionally, needed to not have the subform associate in the main form with any fields.
Alan
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
Wow thank you very much, again.
This is exactly what I needed. And I learned alot along the way.
Glad to be of help. I also learned a few new things with this issue. I find that is often the case when trying to resolve problems others have.
Alan
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
And I successfully used your second video on subforms to add this:
Me.mainquery_subform.Form.Visible = False in the Form_Activate and clear buttons code
and
Me.mainquery_subform.Form.Visible = True on the search button code
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks