Minggu, 28 Juni 2015

Re: [MS_AccessPros] program stop in updateable query

 

Valentino-


You can just "lookup" the one value, like this:

SELECT DLookup("Anni", "apptblannidarichiedere") As YearValue, aptbsenewcalcolo01.Costline, aptbsenewcalcolo01.des, aptbsenewcalcolo01.reportcode, aptbsenewcalcolo01.ProductCode, aptbsenewcalcolo01.V1 FROM aptbsenewcalcolo01;

That should avoid the "not updatable" error message.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Jun 28, 2015, at 8:35 AM, Valentino Avvisati valentino.avvisati@gmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

Hello John,
fisrt if all I want to thank you for the support
this group it is really useful
coming your question,  there is no reation


the goal is to add the record that are in table:
"aptbsenewcalcolo01" into  "tblmain01bis01"
and also one Value that is in table "apptblannidarichiedere"  just one field (the selected year)
this value  need just to go inside the table "tblmain01bis01" like it is and there is not relation between "aptbsenewcalcolo01" and "apptblannidarichiedere"
it is just an easy way to add one value that is the same for all record that are in table aptbsenewcalcolo01 that I want to insert into tblmain01bis01

in shorth in table 1 I have the following fields:
A-B-C
in table 2 I have just one year that was selected
Year
the goal is to move
A-B-C and YEAR in table 3
 

probably there are better and more professional  way to do this ....




not really there in the table "apptblannidarichiedere" there is one value in one field that simply I want to be added like it is in the

2015-06-27 22:19 GMT+02:00 John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>:
 

Valentino-


Access gets picky sometimes.  The query:

SELECT apptblannidarichiedere.Anni, aptbsenewcalcolo01.Costline, aptbsenewcalcolo01.des, aptbsenewcalcolo01.reportcode, aptbsenewcalcolo01.ProductCode, aptbsenewcalcolo01.V1 FROM aptbsenewcalcolo01, apptblannidarichiedere;
Is not updatable because you have no JOIN criteria in the FROM clause.  Is there no relationship between the two tables?

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Jun 27, 2015, at 6:43 PM, Valentino Avvisati valentino.avvisati@gmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

 Hello John,
Below there is one of the query
Very often the program go on with no problem but sometime start to giving me error run time 3073
And if I choose debug option,  the following query is yellow marked  and  If I go on with F8 debugging the code,  the program is going ahead regularly performing the query.

 

In addition is not always with the same query, can be different and very often do not happen

 

 

 

 

 

 db.Execute "INSERT INTO tblmain01bis01 ( Anno, idcostcode, des, reportcode, ProductCode, FV )" & _
 "SELECT apptblannidarichiedere.Anni, aptbsenewcalcolo01.Costline, aptbsenewcalcolo01.des, aptbsenewcalcolo01.reportcode, aptbsenewcalcolo01.ProductCode, aptbsenewcalcolo01.V1 " & _
"FROM aptbsenewcalcolo01, apptblannidarichiedere;"

 

 

 


2015-06-27 15:26 GMT+02:00 John Viescas JohnV@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>:
 

Valentino-


Can you give us an example of the SQL that is causing a stop?
 
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Jun 27, 2015, at 2:46 PM, Valentino Avvisati valentino.avvisati@gmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

Good morning,
I have another small questoin for this wonderful group

I have some code that is running some update query
"db.Execute "UPDATE .....,

 I do not know whay but somtime running this query the program stop with the advice that need advice










__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (6)

.

__,_._,___

Tidak ada komentar:

Posting Komentar