Hi, I have a table where two fields will make up the primary key. In
a few cases the second field will be blank. When I try to append the
existing data into the keyed table I get the message that it cannot
append a null value into the keyed field.
Is there any way to set this up to allow the nulls in that second
field?
Thanks for any assistnace with this.
Robbie Bollinger 4 1917
Nulls not allowed in key fields...no way around that. Change the PK for you
table to fields that reflect the true nature of the data and that will not
be null. ro*****@hotmail .com (R Bolling) wrote in message news:<6e******* *************** ****@posting.go ogle.com>... Hi, I have a table where two fields will make up the primary key. In a few cases the second field will be blank. When I try to append the existing data into the keyed table I get the message that it cannot append a null value into the keyed field.
Is there any way to set this up to allow the nulls in that second field?
Thanks for any assistnace with this.
Robbie Bollinger
Robbie: Ran into this myself recently, and had solved it this way:
Don't use a multi-field key.
Make a numeric field as you PK. Programmaticall y increase the ID
number (of course don't use AutoNumber). Then, open the Indexes
display (right next to the PK toolbar button) and manually create a
new index.
In the Index Name field, enter "SecondaryK ey" (or whatever you want).
Enter your first field name on that same row. Enter the second in the
next row. Move back up to the row above, and then, in the bottom half
of the pop-up, change "Unique" to Yes, and "Ignore Nulls" to Yes.
You can't ignore nulls on the primary key, but any others are
perfectly acceptable. Hopefully this works for your project.
Anthony.
"Anthony Cuttitta Jr." <ac*******@rail van.com> wrote in message
news:66******** *************** ***@posting.goo gle.com... ro*****@hotmail .com (R Bolling) wrote in message
news:<6e******* *************** ****@posting.go ogle.com>... Hi, I have a table where two fields will make up the primary key. In a few cases the second field will be blank. When I try to append the existing data into the keyed table I get the message that it cannot append a null value into the keyed field.
Is there any way to set this up to allow the nulls in that second field?
Thanks for any assistnace with this.
Robbie Bollinger
Robbie: Ran into this myself recently, and had solved it this way: Don't use a multi-field key.
Make a numeric field as you PK. Programmaticall y increase the ID number (of course don't use AutoNumber).
why 'of course'? Then, open the Indexes display (right next to the PK toolbar button) and manually create a new index.
In the Index Name field, enter "SecondaryK ey" (or whatever you want). Enter your first field name on that same row. Enter the second in the next row. Move back up to the row above, and then, in the bottom half of the pop-up, change "Unique" to Yes, and "Ignore Nulls" to Yes.
You can't ignore nulls on the primary key, but any others are perfectly acceptable. Hopefully this works for your project.
Yes, assuming that's what he wants. Robbie actually hasn't told us enough
really.
"rkc" <rk*@yabba.dabb a.do.rochester. rr.com> wrote in message
news:EF******** ***********@twi ster.nyroc.rr.c om... "Mike MacSween" <mi************ ******@btintern et.com> wrote in message news:3f******** *************@p ubnews.gradwell .net... "Anthony Cuttitta Jr." <ac*******@rail van.com> wrote in message news:66******** *************** ***@posting.goo gle.com...
You can't ignore nulls on the primary key, but any others are perfectly acceptable. Hopefully this works for your project.
Yes, assuming that's what he wants. Robbie actually hasn't told us
enough really.
You mean like why a two column primary key is necessary, yet not necessary, at the same time?
Yes, something like that. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: JDS |
last post by:
Hi, all. I'd like to do the following, preferably *without* resorting to
JavaScript:
I have a long, dynamically-generated form questionnaire. Not all of the
form fields are dynamically generated, though.
I'd like to capture the NAME of every HTML form field element on the
server, even if that element is submitted blank. The trouble is, with,
say, radio buttons or checkboxes for example, a *blank* element does not
get submitted at all.
|
by: Joel |
last post by:
Hi,
How do you determine if a Date field is blank. In my Sql statement I
only want records who's date field is blank (i.e. checking for only open
invoices where Date_Paid = '' ...still open ...it doesn't work when I use
that syntax)
Thank you
|
by: Joe Scully |
last post by:
Hi all,
I am having trouble with access adding a blank record to a subform
everytime I finish entering data and closing the form. (The form and
subform are based on the one table)
When entering data into the subform I get the pencil icon to show data
addition, but underneath the record I am inputting data the record is
blank with a star(*)icon and this is the record(blank)that always gets
saved with all the records that actually have...
|
by: JC Mugs |
last post by:
I have a form that when you tab from field to field that the entry point is
blank, but if you point and click in the field it brings up a 0 and data
entry is started to the left of the zero.
Thus if you are click and enter 8 becomes 80, but if you tab to the field
and enter 8 it is 8.
So my question: is there an easy way to have Access XP-2002 keep the entry
on the form blank when you click on a field to enter data?
|
by: ChadDiesel |
last post by:
My basic question is why does my print report button on my subform print a
blank report when my cursor is on a blank entry line? Here is a more
detailed explanation of my problem.
I have a form that contains shipment destination information and a subform
that contains boxes for that shipment. The main form is a table called
Ship_Info, and the subform is a table called Label_Info. They both contain
and are linked by a field called...
| |
by: JohnR |
last post by:
When creating an msAccess db within the Access UI itself the fields that are
text are NOT padded with blanks. For example, if I have a 10 char field and
put in "HI" and then when I come back to the field and click my mouse on it
the cursor is just after the "I" in "HI"... that is, no blanks were added
to the field. However, when I create an MDB database programatically in
VB.Net using ADOX and create the tables using SQL stmts (ie:...
|
by: visionstate |
last post by:
Hi there,
I have a form which has 2 text boxes, a combo box and a sub form in it
(which reads from a query. The query reads from the table).
On load, I would like the fields in the text boxes and combo box to be
become blank. If I use the "" or 'null' instruction then this in turn
makes the corresponding field in the sub form blank which in turn makes
the query field blank and the table field blank!
If I then change the combo box option,...
|
by: BethanyBez |
last post by:
Is there any way when doing a merge with an Access Query and a columned
Word doc that I can avoid blank spaces where the field is blank? I am
creating a columned contact sheet with the contacts grouped by state
and then position title. Some of the states do not have certain
positions filled and this creates a big blank rather than jumping on to
the next position. I heard that if I saved my query as a table after
filtering out Null values...
|
by: sparks |
last post by:
I am trying to fix a database that someone did about 4 yrs ago in
access97.
The main table just contains demographics and is on the main form of
the database.
It has a subform on a tab that contains the other information.
it is set 1 to 1 in the relationships.
simplify if I can
|
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: 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,...
| |
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: 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...
|
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...
|
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: 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...
|
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: 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...
| |