|
-
Feb 21st, 2003, 01:27 AM
#2
Hyperactive Member
Re: .Update Method
Originally posted by Bruce Fox
When updating values in a Row of a Recodset, which is the 'correct' option:
VB Code:
rs.Open sql, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
With rs
.Update "Project_Title", cboProject_Title.Value
.Update "Date_Entered", txtDate_Entered.Value
.Update "Title", txtTitle.Value
End With
rs.Update
rs.Close
Or
VB Code:
rs.Open sql, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
With rs
.Fields("Project_Title") = cboProject_Title.Value
.Fields("Date_Entered") = txtDate_Entered.Value
.Fields("Title") = txtTitle.Value
End With
rs.Update
rs.Close
Cheers,
Bruce.
I would also like to know.
I use :
VB Code:
With rs
!Project_Title = cboProject_Title.Value
!Date_Entered = txtDate_Entered.Value
!Title = txtTitle.Value
End With
Anything wrong with that?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|