1) Create an unbound form and add rest boxes for all the columns on the table except perhaps the RecID or primary key columns.
2) Create the list box as outlined in the previuos method.
3) Add the following code to the After Update event of the listbox so that when the user chooses an entry in the listbox, the code is executed.
Private Sub RecordsListbox_AfterUpdate()
textbox1 = DLookup("[Col1]","table1","[RecID]=" & Me.RecordsListbox)
textbox2 = DLookup("[Col2]","table1","[RecID]=" & Me.RecordsListbox)
textbox3 = DLookup("[Col3]","table1","[RecID]=" & Me.RecordsListbox)
textbox4 = DLookup("[Col4]","table1","[RecID]=" & Me.RecordsListbox)
Etc.
End Sub
Another option would be to create a recordset from the table and populate the textboxes with fields from the recordset. Numerous examples can be found in HELP and online.
-----------------------
Then you need to write code to update the records. This can be done with dynamic SQL execution via the Execute or Runsql methods. Yo can also open a record set and use the EDIT and UPDATE methods. There are lots of examples in these forums, in help and online.
-----------------------
Update Example using RunSQL:
Dim sSQL as string
sSQL="Update table1 Set col2='" & me.textbox2 & "', col3='" & me.textbox3 & "' Where recID=" & Me.textbox1
DoCmd.RunSQL(sSQL)
-----------------------
Update example using EDIT and UPDATE methods with recordset:
Sub UpdateTable1()
Dim dbsMyDB As Database
Dim rsttable1 As Recordset
Dim sSQL As String
sSQL="Select * From Table1 Where RecID=" & textbox1
Set dbsMyDB = OpenDatabase("MyDB.mdb"

Set rsttable1 = dbsMyDB.OpenRecordset(sSQL, dbOpenDynaset)
With rsttable1
.Edit
!col2 = textbox2
!col3 = textbox3
!col4 = textbox4
.Update
End With
rsttable1.Close
dbsMyDB.Close
End Sub
-----------------------
NOTE: I haven't tested these examples so they may contain errors but should be sufficient to give you an idea how to proceed. Terry L. Broadbent
Life would be easier if I had the source code. -Anonymous