Robert L. Stewart
rl_stewart at highstream.net
Fri Mar 5 10:57:03 CST 2004
Pedro, Here is what I sent directly to you yesterday. Robert >Date: Thu, 04 Mar 2004 15:25:14 -0600 >To: "Pedro Janssen" <pedro at plex.nl> >From: "Robert L. Stewart" <rl_stewart at highstream.net> >Subject: Re: filtercode permissions > >I guess it is giving you that because you are replacing the SQL statement >in the query. To be honest, I refuse to deal with Access security. I >have never found a database where they could really justify the use of it >or were willing to maintain it for themselves. Now, to answer you >question. When you go to tools | options, you can show hidden and system >objects. After you do that, go to the security portion of the program and >see if you can set permissions for it there. Otherwise try setting the >permissions in the query design to run with owners permissions. > >Sorry that I cannot help you more, but security is not something I will >deal with...too complex. I would rather concentrate on good design rather >than security which the user is responsible for. > >Robert > >At 08:10 PM 3/4/2004 +0100, you wrote: >>Hello Stewart, >> >>ou helped me with the filtercode below. >>When entering he search value and clicking the commandbutton, >>everything works fine when logged in as person with administrator >>permissions. >>When logged in as user i ge an error: "Error 3033. You don't have >>permissions for Object MSysTables". >>When clicking the debugger, the following codeline is highlighted yellow: >>qdf.SQL = strSql & strWhere >> >>Do you know how this is possible or where i can't find MSysTables? >> >From all the hidden objects i changed allready the permissions, but no >>result. >> >>Thanks >> >>Pedro Janssen >> >> >> >> >>----- Original Message ----- >>From: "Robert L. Stewart" <rl_stewart at highstream.net> >>To: "Pedro Janssen" <pedro at plex.nl> >>Sent: Monday, February 23, 2004 4:17 PM >>Subject: Re: need help with filter code >> >> >> > Pedro, >> > >> > Use this code and it will work smoothly. >> > >> > Robert >> > >> > >> > Dim db As DAO.Database >> > Dim qdf As DAO.QueryDef >> > Dim strSql As String >> > Dim strWhere As String >> > Set db = CurrentDb() >> > Set qdf = db.QueryDefs("sqry_AannZoeken_0") >> > ' verwijderd de ; van het einde van de query string >> > strSql = Mid(qdf.SQL, 1, Len(qdf.SQL) - 3) >> > strWhere = " WHERE (" >> > ' maakt de string voor de 6 aannemers waarin gezocht wordt >> > strWhere = strWhere & "(Aann1 Like '*" & Me!txtAannSearch & "*') OR" >> > strWhere = strWhere & "(Aann2 Like '*" & Me!txtAannSearch & "*') OR" >> > strWhere = strWhere & "(Aann3 Like '*" & Me!txtAannSearch & "*') OR" >> > strWhere = strWhere & "(Aann4 Like '*" & Me!txtAannSearch & "*') OR" >> > strWhere = strWhere & "(Aann5 Like '*" & Me!txtAannSearch & "*') OR" >> > strWhere = strWhere & "(Aann6 Like '*" & Me!txtAannSearch & "*'));" >> > Set qdf = db.QueryDefs("sqry_AannZoeken_1") >> > qdf.SQL = strSql & strWhere >> > db.Close >> > Set db = Nothing >> > DoCmd.Echo False >> > Dim strFormName As String >> > strFormName = Me.Name >> > Application.RunCommand acCmdClose >> > DoCmd.OpenForm strFormName >> > DoCmd.Echo True >> > >> > At 11:05 PM 2/21/2004 +0100, you wrote: >> > >Hello Robert, >> > > >> > >here is the stripped database. I'll only left the objects that >> > >are needed for the search. >> > > >> > >The search works in the query, but the form doesn't give the >> > >filtered results immediately. Only after closing and reopening >> > >the form. >> > > >> > >I tried to me.requery, me.refresch, form.requery, form.refresh, >> > >repaintobject in the code, but nothing works. Something >> > >i am doing wrong? >> > > >> > >Thanks for looking at it. >> > > >> > >Pedro Janssen >> > > >> > > >> > > >> > > >> > >----- Original Message ----- >> > >From: "Robert L. Stewart" <rl_stewart at highstream.net> >> > >To: <pedro at plex.nl> >> > >Sent: Friday, February 20, 2004 7:09 PM >> > >Subject: Re: need help with filter code >> > > >> > > >> > > > Pedro, >> > > > >> > > > Can you send me a copy top look at >> > > > with the minimum of tables, queries, >> > > > and forms? >> > > > >> > > > Robert >> > > > >> > > > At 12:00 PM 2/20/2004 -0600, you wrote: >> > > > >Date: Fri, 20 Feb 2004 14:43:07 (MET) >> > > > >From: pedro at plex.nl >> > > > >Subject: Re: [AccessD] Re: need help with filter code >> > > > >To: accessd at databaseadvisors.com >> > > > >Cc: rl_stewart at highstream.net >> > > > >Message-ID: <200402201343.i1KDh7RM028562 at mailhostC.plex.net> >> > > > > >> > > > >Hello Robert, >> > > > > >> > > > >the form is based on the _1 query, and i allready places me.requery >>in >> > >the >> > > > >code , between the last line of code you gave me and the End Sub. >> > > > > >> > > > >Pedro Janssen >> > > > >> > > > >> > > > >> > >> > >> >