Delete more than 1 tables in one Query?
i would like to ask if we can delete more than 1 tables in one query
It would be something like
Delete * From tableA; Delete * From tableB;
[they are located in the same query]
No. You have multiple SQL statements in a single query in Access.
You can achieve the same result by calling a macro, or using code like this:
Dim db As DAO.Database
db.Execute "Delete * From tableA;", dbFailOnError
db.Execute "Delete * From tableB;", dbFailOnError
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http...have "2 timers" in one form, possible?
I have a form, but i need different timers
1) for updating Elapsed time every second (1000ms)
2) Auto Update a query every 20 Minutes (20000ms)
3) User Log-off time session 1 hour (60000 ms)
How can that be done?
Dear expert, thanks a lot!
Allen Phailat Wongakanit
Create a form-level variable (i.e. one declared in the General Declarations
section of the form's module), e.g.:
Private mdtFormOpen As Date
Assign the time the form was opened to it:
Private Sub Form_Open(Cancel As Integer)
mdtFormOpen = Now()
In the form's timer event, test the nu...Timer of Form
I need help in showing a timer value in a text box as well the user can
still operate a form within the database, whilst the counter is counting down.
I want ot be able to set a variable timer say to 30 seconds and be able to
update text boxes within a form. I don't know if it is possible to update the
form whilst the timer is runnig??
Does anyone have a pre made timer such as this??
many thansk for your help in advance!!
On Mon, 26 Apr 2010 22:31:01 -0700, DontKnow
>I nee...Query Registry problem
This is a multi-part message in MIME format.
I have code like the following lines,
DWORD dwtype, sl =3D 256;
res =3D::RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\GY\\", =
::RegQueryValueEx(hkey, "serverip", NULL, &dwtype, =
::RegQueryValueEx(hkey, "port", NULL, &dwtype, (...Query with alphabet
I want to extract the data of persons whose names are started with the
Alphabet i entered in the Parameter field.
and what will be the coding for create a parameter dialog box?
Like [Enter First Letter] & "*"
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
"Arunoday" <Arunoday@discussions.microsoft.com> wrote in message
>I want to extract the data of persons whose names are started with the
> Alphabet i entered in the Parameter field.
> and what w...Microsoft Query #4
I receive message SQL0104 when changing a column heading
in Microsoft Query while using the Client Access ODBC
driver to connet to an iSeries 400 server. I have been
informed by IBM that this is a problem with Microsoft's
Query in that it incorrectly quotes the new Column Heading
name before sending it to the ODBC Driver . Is anyone
aware of a update or solution?
Thanks everyone, I just located the following Microsoft
Knowledge Base Article 298955, I followed the procedures
below, and the SQL0104 error went away.
1. Quit all Office programs..
2. Click Start, and ...Between in a query
I have a field [Fødselsdato1] (birthdate, short date) and I am interested in
finding out all those who are 50 to 60 years.
I tried Year(Date())-50 and Year(Date())-60 and found those that are 50 and
60, but not all those from 51 to 59 years.
Can someone please help me?
Tom R. Thorstensen
On Jan 8, 6:31=A0am, Tom R. <tom...@broadpark.no> wrote:
> I have a field [F=F8dselsdato1] (birthdate, short date) and I am intereste=
> finding out all those who are 50 to 60 years.
> I tried =A0Year(Date())-50 and Year(Date())-60 and found those tha...timers
Is there any limit on the number of timers i can use in a program ?
I think, it is not. But it is not guaranteed that a timer will come in its
If the system has to administrate to many threads it can swallow some timer
If you are using "regular" timers I don't think so. However if you are using
multimedia timers there is a limitation of 16 if I remeber correctly.
"srinivas" <email@example.com> skrev i meddelandet
> Is there any limit on the number of ti...using vba to loop an insert query until all records in query are d
I've got a table (tblMain) which stores the seat to which each person in the
table is assigned for a given event. I'm working on writing code that will
take the person sitting in the lowest seat number about a certain range and
move that person into the lowest seat number currently empty below that
range. I've figured out the SQL to accomplish the locating of the lowest
occupied seat above the range and the lowest unoccupied seat below the range
and I've figured out the SQL to move the person sitting in the the seat found
above the range into the seat found below the r...Excel Web Query
I'm attempting to use Web Query to import a Web-based table into Excel in
order to perform lookups on the imported data.
The reference point is customer number - common to both my Excel sheets and
the Web-based table.
The problem I have is that the Web-based table is not sorted by customer
number, hence I can not use the VLOOKUP function to transfer relevant
information from the Web table to the Excel sheet.
Yes, I know I can sort the imported table, but the data is dynamic and I'd
like the sheet to be up to date with each refresh. That is not possible as
the data changes back...Web query misbehaviour.
I've built a web query (*.iqy file) getting the page address from the
web. In Excel I choose Data/Import External Data/Import Data... and
select the created iqy file. When I run the query I'm informed that the
program is "Unable to open http://..... Cannot download the information
you requested." However if I choose the Edit Query command from the
drop down list of the right mouse button the requested page comes up
Can somebody explain to me this strange behaviour or if some
explanation exists on this matter?
nessun.ulisse@libe...Variable of Timer ?
I added a timer by overwriting OnTimer:
void CTestPhasePPMDlg::OnTimer(UINT_PTR nIDEvent)
I can Set the timer with
SetTimer(1, 2000, NULL);
but how shall I kill the timer with
if I do not know the variable of the timer?
Or how do I have to set that on up?
On Wed, 18 Apr 2007 10:48:12 +0200, Matthias Pospiech
>I added a timer by overwriting OnTimer:
>void CTestPhasePPMDlg::OnTimer(UINT_PTR nIDEvent)
>I can Set the timer with
>SetTim...Joining Multiple Queries
Apologies if previous post hits the forum. I pressed enter in error.
I have 6 queries which have been derived from a common table field and
similar queries from other tables. Each query has a date and a number and
each query has exactly the same dates although there may not be a number
every day - where there were two numbers for a day I have grouped by date
from the basic data to sum the figure. Hence I have (number of records
minimised just to show principle)
nb Headings are "mydate" and variations on balance ie "Eurbal", "USDbal" etc
Eur Query USD ...Can't edit SQL question in MS Excel/Query
I'm running Win2k SP3, Excel 2000 SP-1 and have created SQL questions
that fetch data from an Oracle 8i DB via ODBC.
Sometimes (or actually quite often) I can't edit the SQL questions in
MS Query. The MS Query icon just flashes in the taskbar and disappears.
Any wiz got any idea what can be done about it?
I'm not sure about the MS Query icon you are talking about in the taskbar but the way I can get to MS Query using Excel 2000 and connectiong to Oracle database is choosing 'Data' followed by 'Get External Data', and then choosing '...Reverse DNS query
Have an issue with DNS I think.
I have a user that is getting the following NDR for Exchange 2003:
You do not have permission to send to this recipient. For assistance,
contact your system administrator.
<domain.co.uk #5.7.1 smtp;501 5.7.1 <users email>... Sender IP
this has only just started to happen and seems to affect a few domains here
and there - most mail is going through
I have been looking around the net and have run the DNS report which has
Reverse DNS entries for MX records - ERROR: The IP of one or m...Query executed by the user
Is it possible to find each user account who has performed query operations
against a DB?
I did manage to find something for SQL 2005 which does give me the query
that is executed and the time..This does not list the user account..
SELECT deqs.last_execution_time AS [Time], dest.text AS [Query]
FROM sys.dm_exec_query_stats AS deqs
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest
ORDER BY deqs.last_execution_time DESC
I want to find these info for both SQL 2000 and 2005...
Thanks a lot for your answers,
Jaison Jose (JaisonJose@discussions.microsof...Crosstab Query to produce a report with row field with multiple s.
I'm trying to mimic an excell spreadsheet type summary report with a crosstab
query that has a project number in the first row, SumBudgeted Rev,
SumProjected Rev, SumActual Rev in the second row that belong to that project
number and the Columns are Dates in "mm-yyyy" format. The value field is
Actual Rev minus Budgeted Rev divided by Budgeted Rev. The object is to show
monthly totals of revenues per project number with a calculated column at the
very end in percent. Sorry about the display name all of the good ones are
There is a solution for a monthly crosstab...SQL query with multiple columns
I am trying to get a query to obtain results from a table that
contains approx. 12 million records in short time frame.
Below is an example of the query.
select sum(field_1) as total, field_2, field_3, field_4, field_5,
field_7, field_8, field_9, field_10, field_11, field_12, field_13
where datepart(M, field_4) in
and datepart(YYYY, field_4) in ('2004','2005','2006','2007,'2008'...Formula query #2
I am trying to identify a formula which will add and then display th
number of times a number appears in a range.
For example, the range looks like this
The numbers which appear in the applicable range e.g. 1110, could b
any number between 1110 and 9999 and as such I cannot simply predefin
which number to look for.
I am hoping the output could like as follows:
4.....Sub-Query not reflecting changes to the master query it uses
Error in Access 2007:
Changes to criteria in a query used as master query are not reflected in
sub-queries (which refer directly, and only, to that master query) unless the
database is closed then re-opened. Why?
I'm using XL professional, have 1gb ram, Access 2007 installed as part of
Office 2007. I'm using one table; all of my sub-queries refer to a master
query within my database.
Ex: If I make a change to my master query so that it collects a limited
range of dates, and then switch to a sub-query referring to that master, the
change in records shown in the master is not...Timer or not Timer
To view the data in a grid using the method refresh the grid with
And 'can display data without using a timer, but sending them to the
source without refreshing?
The data to be displayed are inserted into a MySQL database.
The grid is updated with a reference count. Whenever I question the
counter to see if new records have arrived.
I can indicate an 'alternative?
Try reading through this article:
Comparing the Timer Classes in the .NET Framework Class Library
"win" <...requery on timer? does this make sense?
I have a pie-chart on my main menu; the main menu cannot close, it only
becomes invisible. How do I requery the pie-chart to show new data when a new
workorder is added to the system? Should this be done using a timer or is
there a better way?
I've tried to requery on the got focus event, but that didn't seem to work.
If you have any ideas, I'd be grateful.
...Timers and Threads
I have a class in which I use System.Threading.Timer. The callback function
should send a message using TCPClient. Since the Callback function is in an
another thread this doesn't work!
How do I Invoke a function in the class thread from the callback function?
The Class is not a Form class!
English is not my first language
so any error, insults or strangeness
has happend during the translation.
Please correct my English so that I
may become better at it!
Anders Eriksson wrote:
> I have a class in which I use System.Thre...SQL Query
can the group help please.
I have a database query, bringing in 2 databases linked by a single primary
key (in both db's)
however, when they are brought into excel, they appear linked fine accross
the columns however
every record is duplicated
So I have 2 rows for each item, with the same data
How do I remove the duplication, within the query rather that use
conditional formatting or some other method after
refreshing the worksheet?
Many thanks in advance.
"Vass" <write2mark_BRA_@hotmail.com> wrote in message
...IIF Function in query
I have a table which I have the default value 0, If these a way to use
the function "IIF" in query to keep the cell blank when the cell
contain a 0 as the default value? Because, if there is no quanity
entered, I don't want to see the default value in my report
Thanking you for your help!
That sort of begs the question "Why have a default value if you don't want
IIf([Field] = 0, Null, [Field])
To remove the unwanted 0s, you can write an Update query:
SET MyField = Null
WHERE MyField = 0
Of course, what happens if so...