Results 1 to 5 of 5

Thread: How to Use NULL in Microsoft Access?

  1. #1
    Join Date
    Aug 2006
    Posts
    181

    How to Use NULL in Microsoft Access?

    hello guys,
    I am using the Microsoft Access as the backend of the project. Since I am not much developed in the programming language there are lot of things that I don't know about the Access. Now I am unable to use the null in access. I also don't know much about the usage of null. So anyone can explain me how to Use Null in Microsoft Access? Any other information regarding the related topic will also appreciable.
    QTechnology Ultra-Quiet ATX PSU 460W I MSI K8N Neo4-F I AMD Opteron 144 CABNE0545 2.66Ghz I 2 x 512MB RAM I 380GB Maxtor SATAI Raid0 Hard Drive I 40GB Maxtor IDE Hard Drive I Nvidia GeForce 7900GTX I Win XP Home Service Pack 2 I Soundblaster Xtreme Fidelity Fatal1ty I Mercury Home Theater HT-4500

  2. #2
    Join Date
    May 2008
    Posts
    2,012

    Re: How to Use NULL in Microsoft Access?

    Before going for the code, you should know the concepts of the null that are used in Access. So you can use that according to your need. If the criteria is entered under a field in a query, it returns only matching records. You should keep in mind that Nulls are excluded when you enter criteria. If you are using the Maths which is involving a Null that will usually results in Null. While Access blocks nulls in primary keys, it permits nulls in foreign keys. The only data type that can contain Null is the Variant in the Visual Basic.

  3. #3
    Join Date
    Apr 2008
    Posts
    2,005

    Re: How to Use NULL in Microsoft Access?

    If you want to use the null in Access along with the SQL, then you can follow the steps mentioned by me :
    1. You will have to start by opening the SQL view window.
    2. You should be knowing that for seeing the columns 'select' option is used in SQL. Then you will have to type "SELECT" and the name of the columns you want to see. After typing the above command press the Enter.
    3. Then type "FROM" and the name of the table containing the columns. After typing the appropriate command you will have to press Enter.
    4. Type "WHERE" and the name of the column that may contain NULL values.
    5. Next, type an equal sign and "NULL."
    6. At last you can run that query.

  4. #4
    Join Date
    Jul 2006
    Posts
    289

    Re: How to Use NULL in Microsoft Access?

    I am doing the Visual basic and I don't know much about the Access. But I think that the steps mentioned by the 'kelfro' should work. In Visual Basic, the only data type that can contain Null is the Variant. You must consider the possibility that the field may be null whenever you assign the value of a field to a non-variant. You can have a look at the following coding (not correct) and then try to figure out what can go wrong with this coding :
    Code:
    Dim strName as String
    	Dim lngID As Long
    	strName = Me.MiddleName
    	lngID = Me.ClientID
    When the MiddleName field contains Null, the attempt to assign the Null to a string generates an error.
    Signatures reduce available bandwidth

  5. #5
    Join Date
    Nov 2008
    Posts
    1,192

    Re: How to Use NULL in Microsoft Access?

    Many times you get an error related to the null. Such errors can be caused while trying to establish a trusted connection and the Internet Information Server (IIS) uses to process the request for the ASP page does not have a corresponding NT Authentication login in SQL Server. This is the common error that many people get. You can also get an error when you are trying to use standard SQL Server authentication to establish a connection. And at the same time the UID parameter is not specified in the ADO connection string. So always keep out of such things.

Similar Threads

  1. Replies: 2
    Last Post: 15-02-2012, 05:52 PM
  2. Microsoft Access Vs. SQL Server
    By N I C K in forum Software Development
    Replies: 4
    Last Post: 04-02-2010, 06:07 AM
  3. How to Use BETWEEN in Microsoft Access SQL?
    By shivendra in forum Software Development
    Replies: 4
    Last Post: 04-02-2010, 05:42 AM
  4. VB working in Microsoft Access
    By Uzair in forum Software Development
    Replies: 5
    Last Post: 31-01-2010, 01:48 AM
  5. FileMaker Vs Microsoft Access
    By jean-paul martell in forum Windows Software
    Replies: 3
    Last Post: 30-11-2009, 02:13 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,269,201.41785 seconds with 17 queries