Duplicated Values


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Duplicated Values

  1. #1
    Join Date
    May 2007
    Posts
    18

    Question Duplicated Values

    Hello There,

    I have run into a strange problem with Access (2003).

    I have written a parser in VBA, using ADO to connect the Excel Front end to the Access database.
    The program populates several tables, which is all working fine.

    The problem is when you generate a query, within Access, that joins information from two tables populated with the macro.

    ie.

    Table1
    [Name]...[Date].............[01_Field1]
    [A_01]...[2007-04-26]...[01_Val1]
    [A_01]...[2007-04-27]...[01_Val2]
    [A_01]...[2007-04-28]...[01_Val3]


    Table2
    [Name]...[Date].............[02_Field1]
    [A_01]...[2007-04-26]...[02_Val1]
    [A_01]...[2007-04-27]...[02_Val2]
    [A_01]...[2007-04-28]...[02_Val3]


    Join Results
    [Name]...[Date]............[01_Field1]...[02_Field1]
    [A_01]...[2007-04-26]...[ 01_Val1 ]...[02_Val1]
    [A_01]...[2007-04-27]...[ 01_Val1 ]...[02_Val2]
    [A_01]...[2007-04-28]...
    [ 01_Val1 ]...[02_Val3]

    The query appears to take the information for the first match ant replicate it as the values for the rest of the values.

    I have tested with a fresh database and manually entered data, which worked fine. But when you load the data using the macro this problem appears.

    Do you have any suggestions on what I need to modify to prevent this happening.

    Thanks for your help,

    Vulcon.
    Smile, And the whole world ...
    will want to know what your planning

  2. #2
    Join Date
    Aug 2004
    Location
    Orange, California
    Posts
    1,262
    You are only joining by name, you should join by Name and Date. In your example you could just join by date; but as you add more data you could have names that also have the same dates wich would bring back the problem for those entries.

  3. #3
    Join Date
    May 2007
    Posts
    18

    Thumbs up

    Oops!

    Silly me, your dead right!

    Thanks for that,

    Vulcon.
    Smile, And the whole world ...
    will want to know what your planning

Similar Threads

  1. Duplicated Values
    By vulcon in forum Database
    Replies: 0
    Last Post: 05-07-2007, 10:38 PM
  2. Replies: 0
    Last Post: 08-23-2006, 12:21 AM
  3. Replies: 0
    Last Post: 08-23-2006, 12:19 AM
  4. how to clone database using mysql
    By zarien in forum Database
    Replies: 1
    Last Post: 05-17-2006, 03:27 AM
  5. losing Form values from option boxes
    By Paul Klanderud in forum ASP.NET
    Replies: 2
    Last Post: 07-26-2000, 10:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center