Hi all,
I have managed, using a quite tortuous route, to select certain
records in a UNION query. This is based on the results of other
queries.
Question: how the devil do I change the value of a field in these,
and only these, records? I have tried an update query and VBA all
without success. I know help says that you can't change the values in
a query if the data is from other queries or joined tables, but there
must be a simple way of doing what I want. Mustn't there?
Regards
Richard 3 6159
Hi, I have managed, using a quite tortuous route, to select certain records in a UNION query. This is based on the results of other queries.
Question: how the devil do I change the value of a field in these, and only these, records? I have tried an update query and VBA all without success. I know help says that you can't change the values in a query if the data is from other queries or joined tables, but there must be a simple way of doing what I want. Mustn't there?
What are you trying to accomplish? The changes should be permanent, so saved
to original tables, or you just want them for some temporary work, like a
report, then you can get rid of them?
If you want just temporary changes, for example to use in a report, you can
create a make table query. Update data in resulting table, use it as you
need, then you can delete the table.
If you want to permanently save changes in your source tables, you might
need to find some key field or fields who unique identify your records in
source tables. Then, based on those key fields, create one or more
recordsets from your original tables, and update data you need on them
If you post more details, I might help you more specifically.
HTH
Bogdan Regards Richard
If there's unique ID's returned by the Union query you can create an
Update query
based on the result of the ID's for example:
Update tblSomeTable
Set Field1 = SomeValue
Where tblSomeTable.ID In (Select ID From UnionQuery)
Not sure if that helps - I think we need more specific for any
additional suggestions ri************* ****@ntlworld.c om (Richard Williamson) wrote in message news:<62******* *************** ****@posting.go ogle.com>... Hi all, I have managed, using a quite tortuous route, to select certain records in a UNION query. This is based on the results of other queries.
Question: how the devil do I change the value of a field in these, and only these, records? I have tried an update query and VBA all without success. I know help says that you can't change the values in a query if the data is from other queries or joined tables, but there must be a simple way of doing what I want. Mustn't there?
Regards Richard
Woohoo! Taht's got it sorted. Note to self: must start doing more in
SQL rather than query design view!
Where would I be without you guys?!
Many thanks
Richard Me****@Computer SOSNJ.com (MeadeR) wrote in message news:<32******* *************** ****@posting.go ogle.com>... If there's unique ID's returned by the Union query you can create an Update query based on the result of the ID's for example:
Update tblSomeTable Set Field1 = SomeValue Where tblSomeTable.ID In (Select ID From UnionQuery)
Not sure if that helps - I think we need more specific for any additional suggestions ri************* ****@ntlworld.c om (Richard Williamson) wrote in message news:<62******* *************** ****@posting.go ogle.com>... Hi all, I have managed, using a quite tortuous route, to select certain records in a UNION query. This is based on the results of other queries.
Question: how the devil do I change the value of a field in these, and only these, records? I have tried an update query and VBA all without success. I know help says that you can't change the values in a query if the data is from other queries or joined tables, but there must be a simple way of doing what I want. Mustn't there?
Regards Richard This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: boonkit |
last post by:
I try to get better performance by implementing this:
http://dev.mysql.com/doc/mysql/en/alter-table.html
"ORDER BY allows you to create the new table with the rows in a
specific order. Note that the table does not remain in this order after
inserts and deletes. This option is mainly useful when you know that
you are mostly going to query the rows in a certain order; by using
this option after big changes to the table, you might be able...
|
by: Gianfranco |
last post by:
Hi, I'm not familiar at access and at VBA either, so I need some help
or at least some hint please.
I have table "availabledrivers", coming from a query to the table
"drivers". Then I have a table "availablebus" coming from a query to
"bus".
Bus and Drivers have autonumber ID, so the tables I get have the IDs
screwed up..I mean..there are "holes" in them..it's like 1,2,5,7,11,20
etc
Now..I need to link the 2 resulting table...and I have...
|
by: Bob |
last post by:
Hi,
I am using Access 2000 to print out an address book. I have designed
the report based on a database whose first record is not blank. In the
design there is a one line report header, a onle line page header,
three lines of detail (name address etc)and a footer.
On previewing or printing the report it inserts a blank three line
detail section before the first record. Every other page is fine
except this first page. Not a big deal but it...
|
by: mark |
last post by:
Access2000
How do I write a query that combines the CTC field from each record below into
one record? I need to concatenate the CTC field with a separator, like below:
BattID VehicleID STDATE STTIME CTC
LKO500HF 00000000 10/27/2003 4:13:51 AM 4
LKO500HF 00000000 10/27/2003 5:13:51 AM 5
LKO500HF 00000000 10/27/2003 10:13:51 AM 6
LKO500HF 00000000 10/27/2003 11:13:51 AM 4
|
by: Steven Stewart |
last post by:
Hi there,
I have posted about this before, but yet to arrive at a solution. I am
going to try to explain this better.
I have an Employees table and a Datarecords table (one-to-many
relationship). I have fields called InventoryOut and BalanceEnd that
are calculated on the fly for reports and when displayed on forms (they
are not part of any table). I have another field called "BalCarFor"
(Balance Carried Forward) that is part of the...
| |
by: Craig M |
last post by:
Hi,
I've created a query that has all calculations needed, and made a report
based on this.
I have then made a form based on this query.
What I would like to do is print only the current record on the form. This
is because the
report is a "letter" and I only want 1 record per page.
|
by: Chris |
last post by:
Is it possiable to have a iif function in a query where it looks at
the next record. for example if I run the query which lists years and
if the results in record 2 equals the result in record 1 then it
displays an X.
|
by: thread |
last post by:
Hi all i need to build progression calculator for a record and for
this i need to have the possiblity to get the information for the
previous record.
is it posible to do it or i will need to use recordset for this?
|
by: ggfota |
last post by:
I have problem creating Access (Continuous) Form with indepenent CheckBox for each record.
The user should be able to select records that will be processed by VBA based on ChceckBox value.
When I use Table as a source then there's no problem. I have field of Yes/No values, and I'm able to select each record inependently.
But when I want to use Query result as a source then it gets hard to get it working (probably it is not possible, but I...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |