G
Gwen
Hi,
Please help.
I need to create a RWOP make table query. The criteria of
the query is based on the groups the user belongs. It is
my understanding that RWOP queries will only work with
saved queries only. Any idea how I can get the criteria
into a saved query. The name of the make table is user
dependent too.
Below is some of the code I attempted to use.
For i = 0 To usr.Groups.Count - 1
grpname = usr.Groups(i).Name
strcriteria = strcriteria & "= """ & grpname & """ or "
strcriteria = strcriteria & varname
Next i
For i = 0 To usr.Groups.Count - 1
grpname = usr.Groups(i).Name
allgrpnames = allgrpnames & "_" & grpname
Next i
allgrpnames = Right$(allgrpnames, Len(allgrpnames) - 1)
strsql = "SELECT demographic.* INTO [" & allgrpnames & "]
from Demographic"
strsql = strsql & " WHERE(" & strcriteria & ")with
owneraccess option;"
Your help would greatly be appreciated
Please help.
I need to create a RWOP make table query. The criteria of
the query is based on the groups the user belongs. It is
my understanding that RWOP queries will only work with
saved queries only. Any idea how I can get the criteria
into a saved query. The name of the make table is user
dependent too.
Below is some of the code I attempted to use.
For i = 0 To usr.Groups.Count - 1
grpname = usr.Groups(i).Name
strcriteria = strcriteria & "= """ & grpname & """ or "
strcriteria = strcriteria & varname
Next i
For i = 0 To usr.Groups.Count - 1
grpname = usr.Groups(i).Name
allgrpnames = allgrpnames & "_" & grpname
Next i
allgrpnames = Right$(allgrpnames, Len(allgrpnames) - 1)
strsql = "SELECT demographic.* INTO [" & allgrpnames & "]
from Demographic"
strsql = strsql & " WHERE(" & strcriteria & ")with
owneraccess option;"
Your help would greatly be appreciated