473,626 Members | 3,480 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem pasting to a sub form with a SQL 2003 Back End

Hi,
I have an application which uses Access 2003 as both the FE and the BE.
However, for a number of good reasons, I am in the process of
converting the BE to SQL server 2003. I am not converting the FE to
ADP, I am simply linking the tables using ODBC. I have overcome a
number of isues and it is working quite nicely, however I do have an
issue with a sub form.

I have a main form with two sub forms. I can enter text directly into
the sub forms and it works fine, as I would expect. However, I need to
be able to copy a number of lines from one sub form, and paste them
into the other (both sub forms have exactly the same field names and
types, but they are based on different tables). When I do this, every
field in the second sub form (i.e. the one i am pasting to) is
displayed as #Deleted, yet if I close the main form and go back in, it
has pasted successfully, and all the lines are displayed.

This works fine with the Access 2003 BE. Can anybody suggest a reason
why this might be happening? I did have some code on the BeforeInsert
event of the sub form which I thought might have been causing it, but I
have taken that out and it is still happening.

Thanks for any advice,

Colin

Dec 11 '06 #1
3 1695
Likely you have an Autonumber (SQL Server "identity" field) as the key...
and in many cases, one of which you have encountered, ODBC does not
automatically receive the newly created identity field and return to the
Form for display. I've never encountered the situation you describe, because
having multiple tables with the same content is almost certainly indicative
of an "unnormaliz ed" design. There are exceptions, but they are rare... I'd
repeat with emphasis, _rare_. You might be able to do what you want with
VBA code...

With some other server DBs, we found it useful to write a Stored Procedure
that would obtain for us the next key in sequence for a table, and update
the table-of-tables. Thus we didn't use the server's identity field
capability. When we moved some applications to MS SQL Server, we found that
worked very well there, too.

Short of a discussion on what you are accomplishing with the two tables with
identical data, and how that could be done differently, I think perhaps you
may need to create a similar Stored Procedure, and copy the data into the
other table using code.

Larry Linson
Microsoft Access MVP
"Bobby" <bo****@blueyon der.co.ukwrote in message
news:11******** **************@ l12g2000cwl.goo glegroups.com.. .
Hi,
I have an application which uses Access 2003 as both the FE and the BE.
However, for a number of good reasons, I am in the process of
converting the BE to SQL server 2003. I am not converting the FE to
ADP, I am simply linking the tables using ODBC. I have overcome a
number of isues and it is working quite nicely, however I do have an
issue with a sub form.

I have a main form with two sub forms. I can enter text directly into
the sub forms and it works fine, as I would expect. However, I need to
be able to copy a number of lines from one sub form, and paste them
into the other (both sub forms have exactly the same field names and
types, but they are based on different tables). When I do this, every
field in the second sub form (i.e. the one i am pasting to) is
displayed as #Deleted, yet if I close the main form and go back in, it
has pasted successfully, and all the lines are displayed.

This works fine with the Access 2003 BE. Can anybody suggest a reason
why this might be happening? I did have some code on the BeforeInsert
event of the sub form which I thought might have been causing it, but I
have taken that out and it is still happening.

Thanks for any advice,

Colin

Dec 11 '06 #2

Larry Linson wrote:
Likely you have an Autonumber (SQL Server "identity" field) as the key...
and in many cases, one of which you have encountered, ODBC does not
automatically receive the newly created identity field and return to the
Form for display. I've never encountered the situation you describe, because
having multiple tables with the same content is almost certainly indicative
of an "unnormaliz ed" design. There are exceptions, but they are rare... I'd
repeat with emphasis, _rare_. You might be able to do what you want with
VBA code...

With some other server DBs, we found it useful to write a Stored Procedure
that would obtain for us the next key in sequence for a table, and update
the table-of-tables. Thus we didn't use the server's identity field
capability. When we moved some applications to MS SQL Server, we found that
worked very well there, too.

Short of a discussion on what you are accomplishing with the two tables with
identical data, and how that could be done differently, I think perhaps you
may need to create a similar Stored Procedure, and copy the data into the
other table using code.

Larry Linson
Microsoft Access MVP

Thanks Larry,
I'll take a look at some of the points you have raised. Just to clear
up one point, the tables don't hold the same data, they just have some
of the same fields. One table is a Purchase Order table, the other is a
Returned Items table. The two sub forms use the same fields from each
table, and I use copy and paste between the two as an easy way for the
user to select which items are being returned, but both tables have
other fields which are more specific to the data which they hold.

Thanks again

Colin

Dec 12 '06 #3

Bobby wrote:
Hi,
I have an application which uses Access 2003 as both the FE and the BE.
However, for a number of good reasons, I am in the process of
converting the BE to SQL server 2003. I am not converting the FE to
ADP, I am simply linking the tables using ODBC. I have overcome a
number of isues and it is working quite nicely, however I do have an
issue with a sub form.

I have a main form with two sub forms. I can enter text directly into
the sub forms and it works fine, as I would expect. However, I need to
be able to copy a number of lines from one sub form, and paste them
into the other (both sub forms have exactly the same field names and
types, but they are based on different tables). When I do this, every
field in the second sub form (i.e. the one i am pasting to) is
displayed as #Deleted, yet if I close the main form and go back in, it
has pasted successfully, and all the lines are displayed.

This works fine with the Access 2003 BE. Can anybody suggest a reason
why this might be happening? I did have some code on the BeforeInsert
event of the sub form which I thought might have been causing it, but I
have taken that out and it is still happening.

Thanks for any advice,

Colin
Ok, I finally resolved this issue. After a lot of work trying various
solutions such as using VBA and temporary tables etc., I resolved it by
accident. I refreshed the ODBC link for the table the form was using,
and it worked immediately.

I am quite confident that this was the answer, because I had an
identical problem with another form, and so went straight to refresh
the link, and it worked again.

Oh well, you live and learn,

Thanks

Colin

Dec 14 '06 #4

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

Similar topics

4
3751
by: Stephan & Saori | last post by:
I found a "weird" problem running windows 2003 Server. Maybe it's a know problem but I just wanted to make sure everyone knows. When running explorer to find the directories on my hard disk. It's very, very fast with the exception of 1 folder. I know it's an accident but it happens to be the JDK folder. I could reproduce this stupid behavior on different boxes running 2003 server. Does anyone knows that "virus" from Microsoft...
12
1550
by: Tom | last post by:
Hi all, I am a newbe to javascript so I could use your help. I checked the FAQs and searched google but I could not resolve this problem. My form is as follows: <form action="serversidehandlerurl.php" method="post" onsubmit="if(document.getelementbyid) { window.open(document.getelementbyid('pblinks').selectedindex.value); return false; }" > <select id="pblinks" size="1" > <option selected="selected" >Select the size...</option>...
3
1824
by: Dr Twin via AccessMonster.com | last post by:
Hello to all I have a huge problem with Access 2003 with SP1, installed on WinXP Pro SP2 with all the current updates. I've tried everything including installing Office again, and again and again. I can't create any new form using wizard based on data of existing tables. That is valid for reports too. Whenever I start any of the wizards to create for example a form based on a table that has around 40 entries, wizard displays only first...
0
1078
by: Ratan | last post by:
I am having an C# .Net application which using WinInet api for FTP downloads and its running fine on win 2000 and win xp but giving problem on win 2003 server. It seems to be failing to login/connect using wininet on win 2003 server. Can anybody tell me whats the problem and what will be the solution.
3
3544
by: Brett | last post by:
How do I get the default VS.NET form icon back after changing icons? Thanks, Brett
1
1444
by: riscy | last post by:
I'm having odd behaviour of VS 2003 pro recently. It happen when Dell 9200 returned from repairs with new motherboard to fix audio out socket problem (as they say). I installed Visual Assist X and the went back to C# programming. On coding window I noticed that the as I put a comment, the blinking bar lag behind where I type, after 1-2 second, it jump back to position where I was typing. It annoying as I don't know where I was typing...
6
2219
by: Bobby | last post by:
Hi, I'm not 100% sure that this is an Access problem. A friend of mine has an Access 2003 database. Occasionally he brings a copy to me so that I can import some of his data into my Access 2003 database. For years he has done this with no problems by bringing his copy on a CD. However, last week he put his database onto a memory stick and brought it to me. When I try to open the database, I get the error "The Visual Basic for...
5
3510
by: wassimdaccache | last post by:
Dear All ; I would like to plant my inbox from MS OUTLOOK 2003 into an access form (2003). Any IDEA for doing would be greatly appreciated. Regards
1
1396
by: marciojersey | last post by:
Hi everyone. I'm having a problem with form opacity in my c# application. I have a window with a vrml viewer com control and whenever the window goes into layered mode, the vrml viewer is rendered onto whatever is behind my window instead of its container window. If my window is hovering over the desktop for example, when the window goes into layered mode, the vrml viewer will be rendered onto the desktop. When this happens, my window obscures...
0
8272
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
8713
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...
0
8644
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8370
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
8514
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7206
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
6126
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
4094
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
2632
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.