473,473 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Macro action: RunSql

24 New Member
Hi guys,

Currently in my DB I have a macro to run an Sql action, I am using the INSERT INTO function. Everything is working fine but I wanted to increase the number of fields that is being entered into the table. In Access the run sql action only accepts up to 256 characters.
I decided maybe it can be done by setting up 2 RunSql actions. The problem I am having is the second RunSql action is not entering the data on the same row as the first RunSql action. Is there anything I can do to make it insert all the fields in the same row. Hope this makes sense. Thanks again for any advice.
Dec 4 '06 #1
2 2795
MSeda
159 Recognized Expert New Member
You have two options:

You could use an event procedure instead of a macro. in the event procedure use the code
mySQL = "your insert into statement here"
docmd.runsql mySQL

or

you could create an append query in access and save it. and then in your macro use the open query command instead of the runsql.

either way will create identical results, so use which ever you are more comfortable with.
Dec 4 '06 #2
Umoja
24 New Member
Thank you MSeda, I was able to do it in the event procedure. Thank you very much.
Dec 4 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: E Harris | last post by:
Hello all. I want to schedule an Access macro to run. The macro runs 3 make-table queries. The best way I thought to accomplish this is to create a shortcut, and then use the task scheduler...
7
by: TSanders | last post by:
Wize ones: I created an Access database for a local telco that is split into a front and back end. I would like to distribute the Access runtime along with the front end. When I use the front...
2
by: Mindy | last post by:
Hey, Does anyone know which function to run updated query in macro? I used "OpenQuery" function, but it seems doesn't work. No error message. The query is correct because I could run it...
8
by: Seeker | last post by:
Hello, In using Solaris Pro Compiler to compile Pro*C code. I am getting this error: make: Fatal error in reader: parser_proc_online.mk, line 26: Badly formed macro assignment Based on other...
4
by: JayDawg | last post by:
I created a macro to delete the contents of a particular table when closing Access. How do I turn off the function that gives the warning messages so it just does it without having to hit OK?
6
by: Takeadoe | last post by:
Dear NG, Can someone assist me with writing the little code that is needed to run an update table query each time the database is opened? From what I've been able to glean from this group, the...
3
by: jl2886 | last post by:
I would like a all records from (a table) where .="Rejected" and input those records into the (a table). Both tables are exactly the same as far as structure. I have created a macro with one...
4
by: destinman via AccessMonster.com | last post by:
I just installed MS Access 2007. Is there any way to turn off the confirmation of action queries in 2007 ? -- Message posted via AccessMonster.com...
8
by: CaptainCrazyHat | last post by:
Greetings! I currently have a table named 2008-01-30. I would like to insert a new field, and I would like that field to be in a Date format and have it populated with the table name. I'll be...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.