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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

batch vs batchupdate

Status
Not open for further replies.

autoIT

IS-IT--Management
Joined
May 10, 2006
Messages
68
Location
US
Someone please clarify, I believe batchupdate updates all records as opposed to batch which only updates current reord correct?

I have a simple data base with some textboxes for user input and a next and a previous button that moves a table to the next record and populates the texboxes with that info.I want the EU to type info into a box, hit next or previous, and have it update the table, and then move to the next record and have that info populate the textboxes, and not have the previous users info fill in the boxes, here is my code:

Private Sub FillControls()

txtFirst = Personel.Fields.Item("First Name")
txtLast = Personel.Fields.Item("Last Name")
txtHire = Personel.Fields.Item("Hire Date")
txtTerm = Personel.Fields.Item("Termination Date")
txtSchedHrs = Personel.Fields.Item("Scheduled Hours")
txtA = Personel.Fields.Item("A Time")
txtB = Personel.Fields.Item("B Time")


End Sub

Private Sub btnNext_Click()

Personel.Update

Personel.MoveNext
If Personel.EOF Then
Personel.MoveFirst
End If
FillControls

End Sub
 
Is this an Access form and Recordset? If so, you will need a little more than just Personel.Update.
 
autoit, not sure if I follow your objective, but if i do,
you're using a very tedious way to populate text boxes.

why not just bind the form?
if a local table, ...recordsource
if remote, recordset

Me.Recordsource = "tblCountry"
Me.recordsource = "SELECT txtCapital, txtPopulation...
"FrOM tblCoubtry WHERE...."

Or


Dim rec as new adodb.recordset
Dim conn as new adodb.connection

conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb"

rec.open "selECT ...FROM...WHERE...", conn,...

Set Me.recordset = rec

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top