Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 03-11-2002, 11:12 PM   #1
Member (9 bit)
 
jalbes's Avatar
 
Join Date: Jul 2000
Posts: 257
How do I save or update to a database?

Let me get right to the point:

-my program starts by filling a combo box with addresses from a database
-when I select an address, I then press "search"
-A new form pops up with all that addreses information. (ie. Tenant name, phone #, Rent cost, etc...)
-all of this works fine until I change a field.

Lets say that John Doe moves out and Bob Smith moves in, I now want to change that in the database. So I search the address, pull up all that addresses information, change the name of the tenant. But how do I save the new information to the database?

here's a copy of the project incase you need to look at it to understand.

Thanx
jalbes is offline   Reply With Quote
Old 03-12-2002, 01:42 PM   #2
Member (10 bit)
 
Join Date: Apr 2001
Location: Michigan
Posts: 850
Send a message via ICQ to HackinCowboy
You want to do something like this:
rsLeases.Edit
rsLeases("Name") = "Bob Smith"
rsLeases.Update


That should do the trick.
~HC
HackinCowboy is offline   Reply With Quote
Old 03-12-2002, 01:49 PM   #3
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
If you want to get into SQL (which is far faster than using DAO or ADO for large updates), use something like this (I didn't look at your project, so substitute the correct names):

UPDATE tblResident SET strName = 'Bob Smith' WHERE strAddress = '241 1st St';
doctorgonzo is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are On



All times are GMT -5. The time now is 10:28 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.1