What I'd like to achieve is having values written to the 2 column listView (should be on the same row). The codes below don't work out right. Everytime something added to SubItem, the value in the first column is pushed down to the next row. Any help is greatly appreciated...
Hi all,
I tried to use .setfocus with my textbox_keydown but it doesn't work. Any idea why ?
Private Sub txtJurCode_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = vbKeyReturn Or KeyCode = vbKeyTab Then
If txtJurCode.Text = "" Then
MsgBox...
I have a listView with 1 column. Please help me the way to add item in listView. The reason I'm trying to use listView instead of listbox b/c in VBA listbox does not have sort property. Thanks so much for your help.
Hi,
This is what I currently have:
For i = 0 to lstBox1.ListCount -1
lstBox2.AddItem lstBox1.Text
next i
lstBox2 is a multiple column listbox. How do I remove all the items in lstBox1 to column(1) of lstBox2 ? Thanks a bunch for your help.
Hello all,
Please help me the code to allow users enter only number in the textbox. I know it's a keydown event but I can't find the ASCII code to do this. Thanks in advance.
Hello all,
Could you please show me how to set focus on a specific row and column ? (in my case I need to set focus on the second column of the last row) Thank you so much.
Hi,
When users add new record and the record already exist in the table, how do I cancel the AddNewRecord action and make the form navigate to the existed record ? Thanks.
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSQL As String
strSQL = "SELECT * FROM myTable WHERE ID = "...
Hi,
I have a form for users to enter data and save it to table. Before saving, it should check if the record for the same ID & year already exist. If it is then just edit record. I got problem with this part. The msg I got is : "Could not update; currently locked by another session on...
Hi,
I have a look up field on my form. Everytime the value of my look up field is changed, I'd like to write that value to a hidden textbox which tied to my table.
I tried: txtHidden = txtLookup on the onChanged event or afterUpdate event of the lookup field but it did not write anything to my...
I got some kind of weird behavior if I delete table from the below code.
When I save new record, it saves twice the first time. Anyone knows why ? Thanks.
With DoCmd
.SetWarnings False
.RunSQL "Delete * from tblJurCode"
.SetWarnings True
.Rename...
This is what I have but I keep getting runtiem error "3211"
The database engine could not lock table 'myTable' because it's already in use by another person or process.
With DoCmd
.SetWarnings False
.RunSQL "Delete * from myTable"
.SetWarnings True...
Hi,
I have a Docmd.OpenReport with Where clause
Docmd.OpenReport "myReport",acViewPreview,,"[ID] = '" & me![txtID] & "'"
If it couldn't find the ID entered in the table, I want to have a msgbox for that. Could you please help me the syntax to do it ? Thanks.
I have a report which has control source from myTable. Then I have a form with 1 textbox for users to enter the jCode they want to search for. (jCode in my table is not a primary key. My primary key is an auto number)
On the form I have button cmdSearch.
Private Sub cmdSearch_Click()...
I have a comboBox (comboBox to lool up the values in a table or query) then I want to have another comboBox using DLookup to list all the records associated with the value chosen in the 1st comboBox(comboJcode).
What did I do wrong ? Thanks...
In the expression builder for my text box (on my report) I have:
="I hereby acknowledge receipt of the " & [tblJCode]![Correction_Year] & " correction..."
How do I query it to the record I want ? In this case it should go to the last record.
Thanks.
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.