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 > VB How-To
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 16th, 2007, 11:26 AM
Authorized User
 
Join Date: Jul 2006
Location: dera ismail khan, nwfp, Pakistan.
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to naveed77 Send a message via Yahoo to naveed77
Default problem in updating records & finding records

dear reader,

i m new to vb6 and access database, i m working on a project, well i want to update a record then it updates but in database it overwrites on first record not its original location.

here is the code that i use,

private sub cmdupdate()

dim tb as new adodb.recordset

tb!letter=txtletter.text
tb!date=date.value
tb!subject=txtsubject.text

tb.update
clearfields

end sub

where is the problem or please tell me the right code so that record must be updated on its original location in database.

another problem is finding data between two dates while one field for current date. i mean i want to find data i.e. from date and to date. so how can i do this whereas i have only one field for storing current date. ?

thnq in advance.
Reply With Quote
  #2 (permalink)  
Old January 16th, 2007, 12:10 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there...

first, you are opening a recordset, but is not related to any database.. how is this working??

the second one is easily solved using SQL

Select x from x where datefield < firstdate and datefield > seconddate


HTH

Gonzalo
Reply With Quote
Reply


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
problem in updating records naveed77 Beginning VB 6 14 January 26th, 2007 05:56 AM
problem in updating records & finding records naveed77 VB Databases Basics 1 January 16th, 2007 12:12 PM
Finding Records Itzamna VB Databases Basics 3 June 7th, 2005 10:44 AM
finding total no. of records reshmisworld Classic ASP Databases 4 July 24th, 2003 06:35 PM
finding total no. of records reshmisworld Classic ASP Databases 1 July 24th, 2003 03:23 PM



All times are GMT -4. The time now is 11:57 PM.


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