I have found this solution:
'-----------------------------------------------------------------------------------------------------------------
Dim rs As DAO.Recordset
Dim Sql As String
Sql = "Select Top 1 Stato, Collezione, Modello, Articolo From dbo_tblScheMod"
Set rs = CurrentDb.OpenRecordset(Sql)
rs.AddNew
rs("Stato").Value = "X"
rs("Collezione").Value = "X"
rs("Modello").Value = "X"
rs("Articolo").Value = "X"
rs.Update
rs.Close
Set rs = Nothing
Dim Sql As String
Sql = "Select Top 1 Stato, Collezione, Modello, Articolo From dbo_tblScheMod"
Set rs = CurrentDb.OpenRecordset(Sql)
rs.AddNew
rs("Stato").Value = "X"
rs("Collezione").Value = "X"
rs("Modello").Value = "X"
rs("Articolo").Value = "X"
rs.Update
rs.Close
Set rs = Nothing
'-----------------------------------------------------------------------------------------------
for the time being I'm content
Il giorno sab 3 set 2022 alle ore 00:17 domcoz via groups.io <domcoz=gmail.com@groups.io> ha scritto:
?Currentdb.TableDefs("dbo_tblScheMod").Fields.Count
29Il giorno ven 2 set 2022 alle ore 22:10 Duane Hookom <duanehookom@hotmail.com> ha scritto:Also open the debug window (press Ctrl+G) and enter this into the window:?Currentdb.TableDefs("dbo_tblScheMod").Fields.Count
If there is a table with the name dbo_tblScheMod, you should see a count of the number of fields.
Duane
From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> on behalf of Duane Hookom <duanehookom@hotmail.com>
Sent: Friday, September 2, 2022 2:35 PM
To: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io>
Subject: Re: [MSAccessProfessionals] Error 3192 in Insert commandI would confirm there aren't two underscores. Also try repair and compact.
-Duane
On Sep 2, 2022, at 2:26 PM, domcoz <domcoz@gmail.com> wrote:
In your navigation pane, is there a table named dbo_tblSchMod or did you remove the "dbo_ " prefix when you linked it? Yes ..I left the name with the precise dbo_
If I copy the command into an empty query, it gives me the same error.
Il Ven 2 Set 2022, 18:21 Duane Hookom <duanehookom@hotmail.com> ha scritto:
What happens when you paste the SQL into a new, blank query? Consider adding ", dbFailOnError" to the Execute.
I assume the fields are all text.
If the table is on SQL server, I would probably perform this append with a pass-through query.
Duane
Sent from my mobile
On Sep 2, 2022, at 10:40 AM, domcoz <domcoz@gmail.com> wrote:
I have a strange problem: I do an insert into command using as usual example:'----------------------------------------------------------------------Dim dbs As DAO.DatabaseDim sql As StringSet dbs = CurrentDbsql = "INSERT INTO dbo_tblScheMod (Stato, Collezione, Modello, Articolo) VALUES ('x','x','x','x');"dbs.Execute sql'---------------------------------------------------------------
and I get error: Could not find output table dbo_tblScheMod.(Error 3192)The table dbo_tblScheMod exists and visible in the Access environment in the Tables section.Do you have any ideas?a million thanks
_._,_._,_
Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#116274) | Reply To Group | Reply To Sender | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [sugeng.panjalu.access@blogger.com]
_._,_._,_
Tidak ada komentar:
Posting Komentar