Help needed for solution

  • Thread starter Thread starter CF
  • Start date Start date
C

CF

I posted a couple times over the past few weeks, but have
yet to get any assistance on this. If someone could
provide some light on this I would surely appreciate it.

I have a report that has a union query as it's source.
The information is being brought in by just one table with
some selections from a form. Now the table is not
normalized and until I get a chance to do it I am have to
deal with this problem. In the table their are attributes
each attribute has a unique identifier "code" some are
main attributes some are sub attributes. The sub
attributes have "detailsforcode" to show which main
attribute it is linked to. Now on the reports I am trying
to sort by the main attribute then the sub attributes. I
have tried several things, but none seems to work. Once
again I would appreciate any soultions to this problem.

Here is my code that I am trying to get to work.

Dim strAtt As String
strAtt = "SELECT Attribute FROM
tblCRTPPACResultsAttributes " _
& " WHERE Code = '" _
& Me!DetailsForCode.Value & "'"
Me.Attribute = strAtt
 
Never mind, figured it out. Sometimes you look at
something too long you don't see the tree in forest.
I used the following:

Dim strAtt As String
strAtt = DLookup
("[Attribute]", "tblCRTPPACResultsAttributes", "
Code:
= '" & Me!DetailsForCode.Value & "'")

Me.Attribute = strAtt
 
Back
Top