473,413 Members | 1,794 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

easiest way to run SQL statments in Access

lee
Newbie question:

I'm looking for the easiest way to run SQL statments in Access. I'm
getting confused by th GUIs - I'm just looking forhow to run SQL on a
table- thanks

Aug 2 '07 #1
2 2364
from the database window, go to the Queries tab and click New. you can use
the query design interface to build a query, or if you're comfortable
writing SQL statements, you can go to the SQL pane from View on the menu bar
(in query Design view), and just write the SQL freehand.

hth
"lee" <go******@worldpost.comwrote in message
news:11**********************@e16g2000pri.googlegr oups.com...
Newbie question:

I'm looking for the easiest way to run SQL statments in Access. I'm
getting confused by th GUIs - I'm just looking forhow to run SQL on a
table- thanks

Aug 2 '07 #2
1. Create a new query.
2. In the first dialog, just choose Design view.
3. Cancel the Add Table dialog.
4. Click the View button (left end of toolbar), which defaults to SQL View
(since you added no table.)
5. Type in the SQL Statement you want.
6. Click the Run button on the Toolbar.

If you prefer, you can execute action or DDL queries from a command prompt.
Open the Immediate Window (Ctrl+G), and Execute the query statement, e.g.:
CurrentDb.Execute "DELETE FROM Table1 WHERE (False);", dbFailOnError

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"lee" <go******@worldpost.comwrote in message
news:11**********************@e16g2000pri.googlegr oups.com...
Newbie question:

I'm looking for the easiest way to run SQL statments in Access. I'm
getting confused by th GUIs - I'm just looking forhow to run SQL on a
table- thanks
Aug 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Angelina | last post by:
Hi, I need some help in writing a 'if-then-else' statement. I currently have wrote one that looks something like this.. If Combobox1 = xxx and textbox1 <> "" then 'run stored procedure 1 to...
7
by: Dan V. | last post by:
Situation: I have to connect with my Windows 2000 server using VS.NET 2003 and C# and connect to a remote Linux server at another company's office and query their XML file. Their file may be...
4
by: Jesper | last post by:
Hi, I would like to issue three statements to the database (mysql v4.1) each time the server starts up. Is there any built in way to do this? Like a init file to put them in? At the moment I...
4
by: Captain Wonky | last post by:
As the subject says... I'm a database novice even though I've been trying to learn Access for years. I've 'almost finished' several databases but always get stumped on something - this time it's...
3
by: R. Hopping | last post by:
What's the easiest way to convert an access form to to a web based Front end ? Is there any software that can convert these formats easily? If not any Beginer tutorials would be helpful. ...
3
by: Vinny Vinn | last post by:
I have used simple batch statments with C#.for example: string select = "select model from cars where id = ?;select * from trucks where model = ?"; where ? is a parameter whose value i have...
5
by: orencs | last post by:
Hello, I am using Microsoft.Practices.EnterpriseLibrary.Data. I am running the following sqlCommand = "SELECT var1 FROM table1 WHERE var2 IN (4,5,6) ; SELECT var3 FROM table2 WHERE var2 IN...
1
by: Syl | last post by:
Hello! Can someone verify this for me please. Should these 2 statments return the same result ? The 2nd one is the original, the first one is my re-write. Thanks : SELECT orders_status,...
2
by: ramdil | last post by:
Hi All Please help me .Hope i have described my problem clearly below. I have a condition where i need to update some data in table from the value taken from another table.So basically i need to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
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...

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.