So it was as simple as 'Debug.Print'. Shame on me.
Yes, the Nz function lets me move both columns in one statement (I use it on 'Weights' too because it contains also Null values).
It is worth a star.
Now that I have a neat for-next loop, I will try to harness the power updatable queries!
I will start studying the relationships and joins.
I have worked on the 'for next' loop option and I have a tricky one to submit.
I need to copy two columns.
Code 1
For i = 1 To n
If Not IsNull(!Weights) Then
dbsInWater.Execute _
"UPDATE StreamerTable SET [Weights] =" & !Weights & "...
dbsInWater.Execute _
"UPDATE StreamerTable SET StreamerTable.Weights = " & DLookup("[Weights]", "StreamerVars")
If the first record in the 'Weight' field from 'StreamerVars' is say 5, then the 'Weight' field in 'StreamerTable' is populated with 5s in all the records.
If it is 56, it is 56 all...
Hi Remou,
The missing space was just a typo trying to adapt the code to the post.
Placing the j outside the quote was the solution. Thank you again.
I have tried Dlookup earlier.
dbsInWater.Execute _
"UPDATE StreamerTable SET StreamerTable.Weights = DLookup("[Weights]", "StreamerVars")"...
I am trying to move entire columns between two tables.
The first attempt:
dbsInWater.Execute _
"UPDATE StreamerTable SET StreamerTable.Weights = (SELECT Weights FROM StreamerVars)"
gives me a run-time error 3073
'Operation must use an updatable query'
Second attempt:
Dim ASet As...
OHHH, me stupid. I forgot to close the database at the end of my modules. Days and days trying useless things, when it was so obvious.
I believe I have been a little too long away from Access.
Anyhow, many thanks and four stars as promised.
I have read a couple of threads, including the one you mention.
I do not think ADO is for me. My database is not big enough to make the move. I have to manage 1500 items at the most. And there will be a maximum of 5 users. (I am working on a seismic vessel).
Some code. In my latest attempt, I...
I have just moved to Access 2003. I am designing a database as a single user.
All the problems described below occur when I run code from a module.
Problem 1:
Opening the database by double clicking the file in Explorer works fine until I start my code. It stops on the ‘Set dbs =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.