Hi Maurice,
Thanks - close but no cigar. When I take the ( ) out, I get a syntax error.
I've gotten closer however, still not working. Now it is giving a list of
the field name...
So here's what I got now. I eliminated the strfield2 for now.
Dim strfield1 as string
' Dim strfield2 as string
strfield1 = "(select tblfield from sstable where viewname = ' " &
Me.txtCrit1 & " ')"
' strfield2 = "(select tbltable from sstable where viewname = ' " &
' Me.txtCrit1 & " ')"
Me.txtVal1.RowSource = "select distinct" & strfield1 & " from tblevents"
the table looks like
viewname tblfield tblname
Event ID eventid tblevents
So when I select Event ID as txtCrit1 it translates that to eventid, but
then when it hits the rowsource all I see in my list is eventid not the
actual list of eventids....
> Jen,
>
[quoted text clipped - 46 lines]
> >
> > thanks much in advance for your advice... I'm stumped!
Maurice - 04 Jun 2007 18:12 GMT
Jen,
In that case shouldn't you refer to more fields because now you are only
referring to only one field eg tblField. Why not try something like:
strfield1 = "SELECT * FROM sstable where viewname = ' " & Me.txtCrit1 & "'"
This should give you all the fields from the selection you've made via the
criteria you've entered via strfield1.
hth

Signature
Maurice Ausum
> Hi Maurice,
>
[quoted text clipped - 72 lines]
> > >
> > > thanks much in advance for your advice... I'm stumped!