Hello
I need to update a textbox that shows the number of items in a listbox. I tried using this code but I suspect that asCmdSave Record isn't right
It doesn't do anything to change the textbox, txtCount.
I input names into a textbox that is saved to a table that the listbox shows the records.
The code for the textbox to table is...
any ideas?
Duane
I need to update a textbox that shows the number of items in a listbox. I tried using this code but I suspect that asCmdSave Record isn't right
Code:
Private Sub lstEmployees_AfterUpdate()
DoCmd.RunCommand acCmdSaveRecord
DoEvents
txtCount.Requery
End Sub
It doesn't do anything to change the textbox, txtCount.
I input names into a textbox that is saved to a table that the listbox shows the records.
The code for the textbox to table is...
Code:
Private Sub cmdAddEmployee_Click()
On Error GoTo Err_cmdAddEmployee_Click
txtAddEmployee.SetFocus
DoCmd.GoToRecord , , acNewRec
Exit_cmdAddEmployee_Click:
Exit Sub
Err_cmdAddEmployee_Click:
MsgBox Err.Description
Resume Exit_cmdAddEmployee_Click
End Sub
any ideas?
Duane