Hello
I'm trying to add some data to an VBA-export function I created a while ago. Basically I need to add the data from the table Stik_Samling to the bottom of my first export function with OpenRecordset VBK_Knude.
However I've run into a few issues, the number of columns in Stik_Samling can...
Appreciate the response, I tried a different approach but still get the same error.
Basically I have two very standard select queries, that I put together with a simple Join One-To-One. After that I have a new query (which was previously with a subquery, now with the VBA below). The only...
I'm trying to update a tables in access database column based on a query that I've shown below. I keep getting an error saying "Operation must use an updatable query." I have one standard select query before the one shown below, which I believe is the culprit. The subquery that counts and gives...
I did that because it gave me a Compile Error : Next without For with it in., but again I'm totally newbie at this still, so a lot of trying to understand, and then trial and error 😅
Almost there I think, I changed a little bit in your code to the one below:
Set rst = dbs.OpenRecordset("VBK_Ledninger_TXT", dbOpenSnapshot, dbReadOnly)
Print #fnum, ""
With rst
If Not (.BOF And .EOF) Then
.MoveFirst
OK = True
End If...
You absolute beauty! This works perfectly well.
Now the last thing I have to do, is basically move the location of the XY output, so its position is as shown in the output. So basically it needs to come after the first value which is always $Ledning.
I'm thinking that I could perhaps do...
That comes from VBK_Knude table, which is different from the other. Though the exported name is the same.
I figured it was difficult to show with the XY being multiple for the same line, but you might have a point.
VBK_Ledning_TXT Query, note that there is no XY as this comes from JoinTables...
All the fields, the end .vbk file should look a lot like this(just to give an example). All the XY's with a $Ledning at the top (VBK_Ledning_TXT), should come from the JoinTables function.
$KNUDE '07'
XY 1870.78 108.95 0.0 0.80 0.80
Z_F 40.08
DYBDE 0.70
OB 0.70
POSTNR '14.67.04'
HTYPE...
Sorry that was a left over part, from when I exported the JoinTables to a separate file, just too se if the output was as expected. I've just deleted it in my first post. The only bit that needs exporting is the .vbk file which contains:
VBK_Knude,
VBK_Ledninger_TXT (including the XY from...
Appreciate the help! Well firstly I am in no way an expert, so I'm kinda learning by doing. So any help is much appreciated, the part in JoinTables I wrote I got to function with the expected output and didn't think about optimizing it. Yours is probably a lot better.
Previously I had an XY...
I have a VBA-function that currently joins two queries and finds the XY in sequence between two and exports it in a seperate file (export not shown).
I also have a different function that exports a table in a very specific format needed for it to be importable in another program. Instead of...
Much appreciate your help, I will have a look into what you suggest! And the database in question is set up to work with a specific program, but the data structure is terrible. Also I'm a programmers worst nightmare, someone with basic understanding but no best practice and methods :p
Side-note...