Version: 188.8.131.52 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: en-GB (en_GB); UI: en-GB
|Processor|AMD Ryzen 9 5900HX with Radeon Graphics 3.30 GHz|
|Installed RAM|32.0 GB (31.4 GB usable)|
|System type|64-bit operating system, x64-based processor|
New poster, not a DBA by any means and a real novice at macros.
I have a simple database consisting of 2 tables.
From a form I am able to put data into one of the tables but when I have all the data (4 fields) I would lie to copy it from on table to the other.
The source table is just used to gather the data and not to store it.
The following code runs fine from the Execute SQL Statment window, but I can’t get it to work in a macro.
INSERT INTO tbl_shooting_record (
ID = 1 AND
membership_number != 0
I have looked at:
but I can’t get it to work, I tried al options, the line I used there was:
oStatement.execute(“INSERT INTO ““tbl_shooting_record”” (”“membership”", ““calibre””,"“type”","“serial_number”") SELECT ““membership_number””, ““calibre””,"“type”","“serial_number”" FROM ““tbl_filter_members”” WHERE ID = 1 AND ““membership_number”” != 0 ")
The layout of my form is shown in the attached photo. I’m using Push Button 2 to run the macro.
When I press the button the mouse does the spinning thing, but I can’t see anything happening and if I look into the destination table it hasn’t been updated.
Thanks for any help.
I’ve just seen a post saying that I should be using back tick and not double quotes so I updated my line to:
tbl_filter_members WHERE ID = 1 AND
membership_number != 0 ")
But still nit updating.