Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 11th, 2006, 07:03 PM
Registered User
Join Date: Jul 2006
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Yes to duplicates

is there any way that i can add duplicates in a record?
by the way,my program contains a frmAdd where user adds in a task and its description, and this gets stored in the database. Looks like when i add a task with the same name but different descriptions, my program seems to read in both tasks as the same one, and completely ignores the other one!

Reply With Quote
  #2 (permalink)  
Old July 12th, 2006, 01:29 PM
Friend of Wrox
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts

Could you give more details?
What is the action that results in “completely ignores the other one”?
What is the manifestation of “completely ignores the other one”?
What DB system is this?
Reply With Quote
  #3 (permalink)  
Old July 13th, 2006, 05:09 PM
Registered User
Join Date: Jul 2006
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts

i am using MSAccess 2003 with VB6.
in my frmAdd(VB),i have txtTask,txtDocuments,DTPicker(to show due date),txtDays,txtAttach,txtNotes and command buttons,cmdSubmit,cmdBack. when i add new tasks, my program writes to the db which stores these added tasks and displays it in a report also in db.displaying in the report is fine!
meanwhile,say i add a task 'Appointment meeting' with all the necessary details in the appropriate txtboxes, i click submit, my task is stored in the db. then i add another task with the same name, but choose a different date from the DTPicker. now, my program should read that as a different task from the first one..but looks like, it completely ignores the first one added, and reads in the 2nd one as same as the 1st one.

in my db, i have a table 'AddRecord' where these added tasks are stored, it has the fields as from the frm, Task, Documents, DDate, Days, Notes, Attachment...i have id as an autofield number, should i assign this as my PK?

Reply With Quote
  #4 (permalink)  
Old July 14th, 2006, 11:51 AM
Friend of Wrox
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts

Commonly the auto generated identity field (Autonumber field in Access) is used as the primary key for a table.

I am a little confused here: You state that your "program" should read records that have the same name as separate tasks, and that makes sense. But what doesn't make sense is that this is your program, and your code... it won't do anything on its own without you having written the instructions. SO it is not your program that is ignoring the first record, so to speak, but instead it is your instructions that retrieve or display the records that are incorrect.

So you need to look at whatever part of your code that retrieves and/or displays the records to see why it is only retrieving the most recent record of with a particular name. This could be in your sql select statement, or it could be in some code you have written that displays the records.

Woody Z http://www.learntoprogramnow.com
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing duplicates hewstone999 Access VBA 2 November 4th, 2008 05:26 PM
Checking for duplicates toedipper2 SQL Server 2000 3 June 7th, 2006 03:50 PM
Duplicates in XSLT d_sathish XSLT 1 November 9th, 2005 11:45 AM
Delete duplicates? boson SQL Language 2 August 11th, 2004 04:47 PM
Duplicates ashley_y Access 11 August 14th, 2003 03:41 PM

All times are GMT -4. The time now is 12:55 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.