473,799 Members | 2,885 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem of copying records

Rex
In a table, I have number of records belonging to a particular ID now
if I enter a value in one of the fileds of this table I want it to be
copied in all the records belonging to this particluar ID. for example

ID Name
--------------------------
1 xyz
1
1
1
2
2
2
When I enter "xyz" for any one of the record of ID# 1.. I want all the
other records (with ID# 1) to have the name field as "xyz" so after
this.. the table would look like this

ID Name
--------------------------
1 xyz
1 xyz
1 xyz
1 xyz
2
2
2

I know this is not possible in table itself.. However I presume it
would be possible to do this in a form. But I dont know HOW

cheers
Rex

Oct 5 '06
38 1816
Rex
I don't have "Name" as a field name.. That was just an example to
explain the problem in a simpler way. But thanks for the suggestion.. I
will definately keep this in mind and would check the list of reserve
words before I design my tables..

cheers!

Bas Cost Budde wrote:
Believe me salad... using "name" as a field name is not a good idea.
Hell breaks loose as soon as you try an expression with that field on a
report...

salad schreef:
Granny Spitz via AccessMonster.c om wrote:
Rex wrote:

You *don't* want to do this in a form. Why not? Look at your schema.
Whether you have 1 or 4 or 50 records with an ID of 1, the Name is
*always*
going to be xyz, or whatever you edit it to be in the future. (Name
is not a
good name for a column by the way, as it's a reserved keyword.)
Which version? I looked at the reserved words for A97 and Name was not
a reserved word. In A2003 its not in the list of SQL reserved words.

--
Bas Cost Budde
Holland
www.heuveltop.nl/BasCB/msac_index.html
Oct 6 '06 #11
"Bas Cost Budde" <b.*********@de v.null.comwrote in message
<eg**********@l ocalhost.locald omain>:
Believe me salad... using "name" as a field name is not a good idea.
Hell breaks loose as soon as you try an expression with that field on
a report...
Not that I'd ever use it, but I'm not sure I follow. In a small test
here, if I refer to it in an expression, I'd usually refer to the
control, which with my usual naming conventions would be called
txtName, and that seems to work OK.

Of course, if one does not rename the control, and use [Name] in an
expression, Access would return the name of the report, but in my
eyes that's expected.

In this test, even using

=Count([Name])

as controlsource of a control works.

When testing code, both

Debug.Print Me.Name ' and
Debug.Print Me!Name

gives the expected result, one returning the report name, the other
the contents of the field in the recordsource/content of the control.

Are there other sircumstances where using Name as field name makes
"Hell breaks loose" in reports? When called in to fix stuff, I've
usually only used the "band aid" of [bracketing] reserved words and
disambiguating controlsource/controls by prefixing control names of
the controls referred to in code or expressions, which usually does
the trick.

--
Roy-Vidar
Oct 6 '06 #12
It may well be a memory leftover from my earlier experience with Access.
And, for me the situation is different, because I use a national
language version. When I name a field Naam, the dutch word for 'name',
Access recognizes this as the Name property on some occasions (when I
use the field in an expression AFAICR) and subsequently refuses to
understand what that means.

[] does no good in that case. In other cases it works fine. I decided to
not use any word that may be associated with a database property for
field names, maybe too rigorously, but for me workable and safe.

RoyVidar schreef:
"Bas Cost Budde" <b.*********@de v.null.comwrote in message
<eg**********@l ocalhost.locald omain>:
>Believe me salad... using "name" as a field name is not a good idea.
Hell breaks loose as soon as you try an expression with that field on
a report...

Not that I'd ever use it, but I'm not sure I follow. In a small test
here, if I refer to it in an expression, I'd usually refer to the
control, which with my usual naming conventions would be called
txtName, and that seems to work OK.

Of course, if one does not rename the control, and use [Name] in an
expression, Access would return the name of the report, but in my
eyes that's expected.

In this test, even using

=Count([Name])

as controlsource of a control works.

When testing code, both

Debug.Print Me.Name ' and
Debug.Print Me!Name

gives the expected result, one returning the report name, the other
the contents of the field in the recordsource/content of the control.

Are there other sircumstances where using Name as field name makes
"Hell breaks loose" in reports? When called in to fix stuff, I've
usually only used the "band aid" of [bracketing] reserved words and
disambiguating controlsource/controls by prefixing control names of
the controls referred to in code or expressions, which usually does
the trick.
--
Bas Cost Budde
Holland
www.heuveltop.nl/BasCB/msac_index.html
Oct 6 '06 #13
Granny Spitz via AccessMonster.c om wrote:
salad wrote:
>>Thanks. In A97 help, the reserved words help file doesn't contain it,
nor 2003. Both referred to Jet SQL reserved words.

Funny they don't include the reserved words in the help files.


There's two lists of reserved words, one for Access and one for Jet SQL.
Beats me why Microsoft can't combine the two into one list so that we only
have to check one list for what's off limits.
Interesting. The only one I could find in ONLINE help, A97 or A2003, is
for Jet SQL. I wonder where they hid the second set in the help files.
I guess one needs to put on a new hat and think "How would MS define
Access reserved words?" If one can get into MS-think, a solution may be
found.

Like "specifications ". I guess I'd think "limitation s" are what people
look for more often.
Oct 6 '06 #14
"Granny Spitz via AccessMonster.c om" <u26473@uwewrot e in
news:67529f3e93 64b@uwe:
salad wrote:
>Thanks. In A97 help, the reserved words help file doesn't
contain it, nor 2003. Both referred to Jet SQL reserved words.

Funny they don't include the reserved words in the help files.

There's two lists of reserved words, one for Access and one for
Jet SQL. Beats me why Microsoft can't combine the two into one
list so that we only have to check one list for what's off limits.
Um, why would you do that? That would obscure the important
differences between *where* you can use them.

And Access and Jet are distinct products.

Now, in the Access help file, sure, why not have a single page with
the Access list followed by the Jet SQL list.

But combining them into one single list would be a huge mistake, as
you'd lose a lot of important information.

And some people use Jet SQL without using Access.

And others use Access without using Jet SQL.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Oct 6 '06 #15
salad wrote:
I wonder where they hid the second set in the help files.
I don't think they intended to put it in there, but I do think they put it on
the web because so many people were asking about the other list of reserved
words that people run into trouble with so often.
If one can get into MS-think, a solution may be
found.
You must be hearing the munchkins singing, "Follow the yellow brick road!"
Like "specifications ". I guess I'd think "limitation s" are what people
look for more often.
They're using the horse of a different color. You just have to look for the
horse of the *right* color and you'll find it, right where they put it. : )

--
Message posted via http://www.accessmonster.com

Oct 6 '06 #16
David W. Fenton wrote:
Um, why would you do that? That would obscure the important
differences between *where* you can use them.
Oh, my! You mean we're supposed to remember *when* it's safe to use the ones
that are on one list but not the other?! That's expecting a lot from people
who have a hard time finding their car keys in the morning! I've got most of
the reserved words memorized so I rarely have to look any of them up, but if
I had to remember *which* list each one came from so I could use it safely
I'd feel like I'd high dived into a shallow pool. My head would hurt! And I
don't want anyone else to feel that pain, either! I'm looking out for them.

--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200610/1

Oct 6 '06 #17
Granny Spitz via AccessMonster.c om wrote:
salad wrote:
>>I wonder where they hid the second set in the help files.


I don't think they intended to put it in there, but I do think they put it on
the web because so many people were asking about the other list of reserved
words that people run into trouble with so often.

>>If one can get into MS-think, a solution may be
found.


You must be hearing the munchkins singing, "Follow the yellow brick road!"

>>Like "specifications ". I guess I'd think "limitation s" are what people
look for more often.


They're using the horse of a different color. You just have to look for the
horse of the *right* color and you'll find it, right where they put it. : )
Obviously you have MS-Think mastered. :-). I've been trying for years,
failing often.
Oct 6 '06 #18
"Granny Spitz via AccessMonster.c om" <u26473@uwewrot e in
news:6760aec11f 3b8@uwe:
David W. Fenton wrote:
>Um, why would you do that? That would obscure the important
differences between *where* you can use them.

Oh, my! You mean we're supposed to remember *when* it's safe to
use the ones that are on one list but not the other?! That's
expecting a lot from people who have a hard time finding their car
keys in the morning! I've got most of the reserved words
memorized so I rarely have to look any of them up, but if I had to
remember *which* list each one came from so I could use it safely
I'd feel like I'd high dived into a shallow pool. My head would
hurt! And I don't want anyone else to feel that pain, either!
I'm looking out for them.
You're an idiot.

<PLONK>

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Oct 7 '06 #19
rkc
David W. Fenton wrote:
You're an idiot.

<PLONK>
You're just sad.
Focused.
But sad.
Oct 7 '06 #20

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

Similar topics

4
2841
by: Google Mike | last post by:
I have RH9 and am using the PHP and MySQL that came with it. I was doing fine with all manner of my web pages for this app until I started having this very strange problem. It's a work order mgmt system. I have 3 tables for the orders: TicketsOpen, TicketsVoided, and TicketsResolved. When one wants to void a ticket, they click it, choose Void, and it is copied to the TicketsVoided table, then removed from the TicketsOpen. And I can...
9
1503
by: Zoo Keeper | last post by:
For some reason, the Python preprocessing balks on the "\" line continuation character. Any ideas/thoughts? Is it just that my version of gcc is not supported? I don't "need" numeric in my current project, but it is a nice package to have! Apps that do not need to be compiled install and run fine. Actually, SQLite built and installed fine... Thanks, in advance.
6
683
by: Club-B42 | last post by:
i've compiled my programm using command "python setup.py py2exe >1" python script works fine, but .exe version fails with ===================================================================== D:\\Scripts\B-4-2\la2luncher\dist>la2launcher.exe Traceback (most recent call last): File "la2launcher.py", line 9, in ? File "config.pyc", line 11, in ? File "config.pyc", line 8, in u LookupError: no codec search functions registered: can't find...
3
2669
by: Jason | last post by:
In enterprise manager I am copying a table from one database to another. I am using the dts wizard to import the data. After I successfully import the data, I open both tables to compare the records to make sure they are the same. I right click on a field and click "last" for both tables. However, the record is different for both. If I do a query the record is still there but they do not show up in the same order. Why does'nt the...
2
2078
by: Vince | last post by:
I have a very specific problem to solve but I cannot find a data structure for it. I don't know if I am posting on the good newsgroup but I cannot find a software.design group. I would like to declare a smart structure initialized via a XML file. The goal of this structure is to store data from a smart card. My XML file describes the file structure of my smart card. On a smart card file are identified by number(sfid) and not by their...
5
2470
by: Nathan Sokalski | last post by:
I am writing an ASP.NET application in which I need to copy DataRows from one DataTable to another. When I use code such as the following: temprows = nodes.Select("state='PA'") temptable.Clear() For Each row As DataRow In temprows temptable.Rows.Add(row) Next
8
2066
by: Howard, Steven | last post by:
I have created a web app that stores and displays all the messages from my database maintenance jobs that run each night. The web app uses Java servlets and has PostgreSQL 7.0 as the back end. When the user requests the first page, he gets a list of all the servers with maintenance records in the database, and a drop down list of all the dates of maintenance records. If the user chooses a date first, then the app uses a prepared...
2
1596
by: Neil | last post by:
I'm using Access 2000 with a SQL 7 back end. I recently implemented some code in a form's AfterUpdate event which calls a stored procedure which copies the contents of the current record to a history table. The code works fine when the user edits and saves the record. However, if the user performs a Find and Replace, the code hangs. At first I thought the code was hanging because of multiple records being replaced. But when I debugged...
1
1557
by: Jan | last post by:
Hi: I've been tearing my hair out over this one for a few days; did a search of the archives and found similar questions but no real answers. Here goes: This is an application for a retail store. There are transactions, transaction details, and then, depending on the type of detail, related records in other tables. So when I'm entering a new transaction, I open a new form (dialog mode) in which additional detail is entered. I need...
0
9685
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, 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...
0
9538
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10473
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, 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...
1
10219
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,...
0
9068
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, 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...
1
7563
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 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...
0
6804
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();...
0
5461
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4138
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 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.