Charlotte Foust
charlotte.foust at gmail.com
Tue Apr 5 18:07:43 CDT 2011
your SQL doesn't establish a join between the two tables, so the result will be a cartesian product, which is never updatable. Assuming you want to update tblWerte and you need to use tblDisposiciones, you need to join the tables on some shared field so that you will return only the fields in each record that relates to the fields in the other table's records. Charlotte Foust On Tue, Apr 5, 2011 at 3:50 PM, Ralf Lister <rlister at actuarial-files.com> wrote: > Thanks a lot Stuart, > > The SQL is: > > SELECT tblWerte.FechaCalculo, tblWerte.Nombre, tblWerte.Beneficiario, > tblWerte.Edad, tblWerte.Sexo, tblWerte.Densidad, tblWerte.TasaActualUSD, > tblWerte.TasaCompUSD, tblWerte.CC, tblWerte.PBR, tblWerte.LimSolInf, > tblWerte.MSR, tblWerte.PR, tblWerte.ValorAportes, > tblWerte.BeneficiosAltPension, tblDisposiciones.GF > FROM tblWerte, tblDisposiciones; > > > Saludos > Actuary Ralf Lister > La Paz, Bolivia > > De: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] En nombre de Stuart McLachlan > Enviado el: Lunes, 04 de Abril de 2011 09:29 p.m. > Para: Access Developers discussion and problem solving > Asunto: Re: [AccessD] Error 3027 > > Can you post the SQL behind qryBeneficiosAlt? > > -- > Stuart > > On 4 Apr 2011 at 20:42, Ralf Lister wrote: > >> Thank you all for your help. >> >> >> >> Charlotte, I`m gathering information data about one person, make some >> calculations and save this calculations in the fields of a query by >> >> >> >> Set dbs = CurrentDb >> >> Set rst = dbs.OpenRecordset("qryBeneficiosAlt") >> >> >> >> With rst >> >> .AddNew >> >> ![FechaCalculo] = Now >> >> ![Nombre] = gstrNombre >> >> ![Beneficiario] = gstrBeneficiario >> >> ![Edad] = gintEdad >> >> ![Sexo] = gstrSexo >> >> ![Densidad] = gintDensidad >> >> ![TasaActualUSD] = gsngTasaActualUSD >> >> ![TasaCompUSD] = gsngTasaCompUSD >> >> ![CC] = gsngCC ' CC = Compensacion de Cotizaciones >> >> ![PBR] = gsngPBR ' PBR = Pension Base Referencial >> >> ![LimSolInf] = gsngLimSolInf >> >> ![MSR] = gsngMSR ' MSR = Monto Salarial Referencial >> >> ![PR] = gsngPR ' Porcentaje Referencial >> >> ![BeneficiosAltPension] = gsngBeneficiosAltPension >> >> ![ValorAportes] = gsngValorAportes >> >> ![GF] = gsngGF >> >> .Update >> >> End With >> >> >> >> to be able to make a report on this very query as a Control Source. >> After printing the report I delete the data in the query with >> "DoCmd.RunSQL "DELETE FROM qryBeneficiosAlt"" and the whole thing >> begins again. >> >> >> >> But at "AddNew I get this error message " Error 3027 at run time./ You >> can't update. The database a/o object is "read only"." >> >> >> >> Saludos >> >> Actuary Ralf Lister >> >> La Paz, Bolivia >> >> >> >> De: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] En nombre de Charlotte >> Foust Enviado el: Lunes, 04 de Abril de 2011 07:24 p.m. Para: Access >> Developers discussion and problem solving Asunto: Re: [AccessD] Error >> 3027 >> >> >> >> Another possible reason is a multiple table query. Anyhow, queries >> don't have AddNew and Update methods (although there are append and >> update queries), so can you clarify what you're actually trying to do? >> >> Charlotte Foust >> >> On Mon, Apr 4, 2011 at 4:04 PM, Stuart McLachlan >> <stuart at lexacorp.com.pg> wrote: > Hard to say without seeing the >> query, but a common reason for a query being RO is that it > doesn't >> include the PK of the table you are trying to update. > > -- > Stuart >> > > On 4 Apr 2011 at 18:54, Ralf Lister wrote: > >> Hello, >> >> >> >> >> I wanted to fill a Query with AddNew and Update. But I get the error >> >> message " Error 3027 at run time./ You can't update. The database >> a/o >> object is "read only"." What can I do to fix this problem? >> >> >> >> >> TIA. >> >> >> >> Saludos >> >> Actuary Ralf Lister >> >> La >> Paz, Bolivia >> >> >> >> -- >> AccessD mailing list >> >> AccessD at databaseadvisors.com >> >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: >> http://www.databaseadvisors.com >> > > > > -- > AccessD mailing list > >> AccessD at databaseadvisors.com > >> http://databaseadvisors.com/mailman/listinfo/accessd > Website: >> http://www.databaseadvisors.com > -- AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd Website: >> http://www.databaseadvisors.com >> >> _____ >> >> No virus found in this message. >> Checked by AVG - www.avg.com >> Version: 10.0.1209 / Virus Database: 1500/3550 - Release Date: >> 04/04/11 >> >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com >> > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > ________________________________________ > No virus found in this message. > Checked by AVG - www.avg.com > Version: 10.0.1209 / Virus Database: 1500/3551 - Release Date: 04/05/11 > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >