Generate a list of certain materials

JQasd

Registered User.
Local time
Today, 22:11
Joined
Jun 21, 2016
Messages
35
Can anyone help me with generating a list / report when a certain material is selected in drop down list. Foe example when Aluminium is selected it shows me all the columns with Metal codes of aluminium and other columns relating to it.

At the moment, I have made separate tables for each material but I want to do this via one main table.i.e instantaneous generation of specific information from main table.

thanks
 
this comment

it shows me all the columns with Metal codes of aluminium and other columns relating to it.

indicates your data is not normalised, so it may be what you want is either very difficult or impossible to do.

Either way not really possible to help without seeing your table design and some sample data
 
Thanks for your reply. Please find the image attached. Is it possible to use a code that could just filter Titanium when it is selected and so forth.
 

Attachments

  • Capture11.JPG
    Capture11.JPG
    55.5 KB · Views: 72
OK as far as the table design is concerned - looks OK

within the view provided, you have a filter available on each column header (click on the little triangle) where you can select one or more values - is this what you want to be able to do in a form?

i.e. have a combo or listbox the user uses to select a material, and once selected, the list is then filtered? If so, do you just want to filter on the material column or also on for example the metalcode column?
 
I want to generate a report that has only titanium in it when titanium is selected. See the List button beside the Material.Basically when a certain material is selected I want the list to generate a report that only gives information about the specific material.
 

Attachments

  • Capture11.JPG
    Capture11.JPG
    11.3 KB · Views: 71
Assuming you already have your report designed to show the fields required, to open it you would use

docmd.openreport "reportnamehere",,,"[Material]='" & me.cboforMaterialsnamehere & "'"

This assumes the cbo is just a list of materials (no ID) and the material field in your table is also text
 
No, at the moment I have created separate tables and then created reports via them. I want to do it via the main table. Any suggestion?/ How to filter it according to material type

Thanks
 
your recordsource for the report would be based on your main table and the criteria passed through when you open the report will filter the data.
 
Please explain in a bit more detail.
Thanks for your reply
 
not sure what else there is to explain.

you have a report - it's recordsource is based on your main table

in your list button on your second image put the following in the click event


docmd.openreport "reportnamehere",,,"[Material]='" & me.cboforMaterialsnamehere & "'"

- change names to match the names report and combo
 

Users who are viewing this thread

Back
Top Bottom