I tried the compact and repair and it's still the same. I hope I did it right it went in a blink of an eye. But it's a small db.
thanks for trying!
Duane
thanks Zameer Abdulla
I used your code:
Private Sub cboName_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & Str(Nz(Me![cboName], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
end sub
but I'm still getting the same results. I also commented out...
Hello
I'm trying to update my contacts form with a combobox. I'm using Access 2k. I tried this code:
private sub cboName_AfterUpdate()
me.recordsetclone.FindFirst "[ID] = " & Me![cboName]
me.bookmark = me.recordsetclone.bookmark
end sub
private sub Form_Current()
cboName = ID
end sub...
Hello
I'm trying to open an Access db that is an older version than my 2k but I'm getting the error "Compile error. Can't find project or library". It refers to this bit of code -
Dim dbs as Database
If I press the help button on the popup with the error description it refers to the help...
thanks Remou for trying
these problems are intermittent. I get differing problems doing the same actions. It seems adding is not a problem until I try deleting then adding.
I can delete an employee and be asked twice the popup box "You are about to delete one row are you sure?"
Sometimes when...
Remou
Your code worked but now when I add someone after I delete someone from the listbox I get some strange things such as a 10 digit negative number for my records. This is the number you see at the bottom of the form with the navigation buttons. The code for the delete is...
Private Sub...
thanks Remou
The listbox is populated from a table. Yes, I want to remove an item from a table based on the listbox selection.
This is the RowSource...
SELECT [tblEmployees].[employeesID], [tblEmployees].[employees] FROM tblEmployees ORDER BY [tblEmployees].[employees];
The ControlSource is...
Hello
I want to delete a selection from a listbox. My wizard created this delete routine for me but I think it pertains to a textbox choice for deletion.
Private Sub cmdDeleteEmployee_Click()
On Error GoTo Err_cmdDeleteEmployee_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, ...
thanks PHV. There is no ControlSource, it's unbound. I use this to fill the box...
Private Sub Form_Load()
Dim myString As String
txtCount = lstEmployees.ListCount & " employees"
End Sub
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
Private Sub lstEmployees_AfterUpdate()
DoCmd.RunCommand acCmdSaveRecord
DoEvents
txtCount.Requery
End Sub
It doesn't do anything...
I did mention the entry to the table would be through a textbox. The table is sorted alphabetically so the entry point to the table depends on what the name begins with. Maybe this is what you are asking for...
Private Sub cmdAddEmployee_Click()
On Error GoTo Err_cmdAddEmployee_Click...
Hello
I'm trying to update a lstbox after adding an entry to it through a textbox. I suppose it works like I add make an entry to the textbox that goes to a table. The listbox shows records from the table from it's RowSource. I hope that made sense. It will show the update if I leave the form...
Hello
How do I count the number of items in a listbox? I've been playing around with the listcount prop but with no luck. I wish to put the number on a label or textbox.
thankQ
Hello
I would like to sort the items in a listbox alphabetically.
In visual basic there is a sort property but I don't see one in Access 2k. What is the best way to sort listbox items?
Duane
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.