I am very new to MS Access, I'm working on automating report using ms access, where user is importing raw excel files, each files is used to get the data to a specific field. My problem is there are multiple different divisions(i.e SG, BR, US, EU, PH) which incorporates in Materials. there is instances where there is multiple same material number but different divisions. I need to get the material value which division belongs to SG. what users do manually to identify SG is to concatenate division with Material since the only lookup in the master query or output file is the Material number, division field is not included. for example
Material Division Value Concat
89098 BR092 78 BR09289098
89098 SG879 20 SG87989098
90921 EU939 80 EU93090921
Since I'm having trouble to get the number of lines to the base number of the output what I'm doing in design view is to set the total to First instead of Group By, so basically what number comes first is what the query is getting .. I need to have the Material number with Value of SG if they belong to the same material, as for the other divisions they have no problem they have to retain their values. I've tried using
Division: First((IIf(Left([Concat],2)='SG','1',IIf(Left([Concat],2)='BR','2','3'))))
then set it to ascending but doesn't work out. The material is still getting the value of BR division.
I need this to be in design view code or sql view code.
It'll be a great help or more over you'll be saving my a$$ if someone can give me the answer. Thanks!