473,396 Members | 1,961 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,396 software developers and data experts.

ACCESS COPY AND PASTE

I am having a problem copying and pasting records into the same table.
When I copy a record that has a zero length string for a field Access
seems to convert it to NULL when pasted. One of the fields does not
allow NULLS so I cannot paste the record. I get the error "You tried
to assign the null value to a variable that is not a variant data
type". I know which field is causing the error b/c when I change it
from a zero length string to a value the record will paste. Anyways, I
know this field value is not NULL and it would seem if you copy a
record already in the table and paste it it should meet the
validations. Anyone else experience this? TIA!!

Nov 13 '05 #1
1 4179
PalJoey wrote:
I am having a problem copying and pasting records into the same table. When I copy a record that has a zero length string for a field Access
seems to convert it to NULL when pasted. One of the fields does not
allow NULLS so I cannot paste the record. I get the error "You tried
to assign the null value to a variable that is not a variant data
type". I know which field is causing the error b/c when I change it
from a zero length string to a value the record will paste. Anyways, I know this field value is not NULL and it would seem if you copy a
record already in the table and paste it it should meet the
validations. Anyone else experience this? TIA!!


I'd use an update query to do this. If there's no pattern you can even
create an auxiliary Y/N field to check the records where you want
zero-length strings to be added and use -1 for the criterion of the Y/N
field. Also, I try not to store zero-length strings unless I really
have to. The Nz function can convert a Null into a zero-length string
on-the-fly.

James A. Fortune

American forces during WWII had tremendous resources and did not need
Critical Path Analysis as much as the British who were faced with
stretching more limited resources. -- Paul Palace

Nov 13 '05 #2

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

Similar topics

7
by: Alex | last post by:
Hi all, I've found a module that I think will help me combine fields properly, but I'm unsure how to add or use it with Access 2000. Below is the module I'd like to add: ...
7
by: Colleyville Alan | last post by:
I have an app that uses Access to grab various PowerPoint slides using the followhyperlink command. I have set the PPT window to run in a minimized state: FollowHyperlink link Set oPres =...
7
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
5
by: Ntl News Group | last post by:
I have a 97 database and want to embed (not link) a picture on a form and report The picture is just a scan of a signature, I am storing it in a table as an OLE object, then on a form I copy and...
2
by: Soddy | last post by:
Hello! I'm playing with an Access 2003 (Converted Northwind & Split) DB. I 'copy & paste' the split Access DB into the 'Solution' of C#.NET and make the 'connection'. I then 'copy & Paste' the...
6
by: james.igoe | last post by:
I've been hired to produce a reporting database that takes data from numerous sources (5 financial products, from three regions, each with multiple tabs) and although I'm confident I can build...
3
by: oli insight | last post by:
I have an excel spreadsheet with 500 rows of information. I want to copy and paste that information into an access table that i'm using, column by column.... But access only lets me copy and paste...
8
by: Irene | last post by:
Hi, I have an MS Access Database with 1 Table containing about 2 million records in Unicode (diferent languages). I would like to export the Table to a Text file (CSV, Tab, etc.) Access...
1
by: ncsthbell | last post by:
I have a dilemia, I have an application that I am having to make some changes to in order for it to run sucessfully under Runtime 2007. We are currently working on upgrading from 2000 to 2007. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
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,...

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.