Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating only one field at a time

Status
Not open for further replies.

Catrina

Programmer
Feb 11, 2000
70
US
I have a form with several textboxes containing data from an Access database. If the user changes one field, I would like to update only that field.
Using Update, updates all the fields.

I have a problem with this, because I do not want to store decimal points or -'s in my database, but I want to be able to display them in the textboxes after the change has been entered. With updating all the fields, the -"s and decimal points I have added after the first update are then added to the database when the next change is made.

Thank you
Catrina [sig][/sig]
 
I've figured it out, instead of setting the datasource and datafield of the textboxes to the recordset, I am printing the field value into the textbox by using:

Text(0).text = rs!EmpNum

then I can use the update to update only the boxes I want by setting the changed value into the field:

rs!EmpNum = Text(0).text
rs.update

I just wanted to post this incase another newby needs this info. Most examples tend to link the data directly to the textbox and you have less control over it.

Catrina [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top