Search results

  1. J

    Delete all items in a comboBox

    Hi: David, thanks for your help, the comboBox is unbound, the data is from sql server, so if I remove the data in comboBox won't effect to the data in table. I am trying to find comboBox items count, so I can know the total number of items in the combobox, so I can use "For Loop" to delete...
  2. J

    Delete all items in a comboBox

    Hi: I added some data into a comboBox: Do Until rst.EOF Me.cmboProduct.AddItem rst!ProductName rst.MoveNext Loop How can I delete them by using VBA code? (I need refresh the list items). Thanks JT
  3. J

    combobox: Can't add this item, index is too large

    Hi: Dk Thanks for your help. However, it doesn't work, all I want is: add rst values to a 2 columns combobox by using vba. Any other suggestion? Thanks JT
  4. J

    combobox: Can't add this item, index is too large

    I don't think my total record number excede the maximum number, because I can list all the category names (from Northwind) in a single column combo box, now I want to add CategoryID in second column. I am pretty sure I have syntax error, but I just don't know where is the problem. Thanks jt
  5. J

    combobox: Can't add this item, index is too large

    Hi: I can add data to a combobox if there is only one colum in the combobox, now I am trying to add data to a two colums combobox using VBA code, but I keep getting this error: Run-time error "6015', can't add this item, the index is too large, here is the code: Me.cmboCategory.ColumnCount...
  6. J

    Use MS Access to get the data from a server database

    I have no experience using MS Access to interface with MySQL. I have a tiny MySQL database that might need to have Access connect with it over the internet and grab data/update etc. Is this practical and what does it take to do it? My project is not time sensitive but I'd like to see what...
  7. J

    call a existing query in vba

    Hi: Haven't use MS Access for a while. I just create a query called qryAppendDate, how can I call in my vba code. Something like: docmd.runquery ???? ( I created the query by using "Create query by using wizard"). Thanks JT
  8. J

    Sum(IIf(DateDiff("d",[Date Entered],[MaxOfDate Entered])>15,1,0))

    Hi: Previouis developer didn't put comments on below Sum function, so I want to understand this totally before I do any modification, here is the code: Sum(IIf(DateDiff("d",[Date Entered],[MaxOfDate Entered])>15,1,0)) AS [More than 15 Days] My questions are: 1. The "Sum" is adding all the...
  9. J

    populate list box data using recordset

    thanks Thank you, it works great!
  10. J

    populate list box data using recordset

    Hi: I have a listbox, and a recordset (DAO.Recordset). If I clike a button, and go through the code line by line, the listbox can show the result: when hit the line: Set Me.listBoxResult.Recordset = rs However, if I don't go through the code line by line, just click the button, it just won't...
  11. J

    how to call a pre-defined query

    can i write this: Dim iCount As Integer iCount = DLookup("FieldName", "qryTotalProducts") So the "iCount" will have the value of "FiledName" which cotains the totalNumofProducts? Thanks.
  12. J

    how to call a pre-defined query

    I still want to call the query Thanks for your hlep. In fact the query is pretty complicated(the query is calling another query...), the example I put is just simplified. So I still want to call the query, and get the query retrun values. How to do that? Thanks.
  13. J

    how to call a pre-defined query

    Hi: Khawar 1. in the Objects window -> Queries -> Create New Query 2. The "Simple Query Wizard" will ask me which table, I selete tblProducts. 3. in the query build window: Field1: totalCount: Count(*), Field 2: productsId. (hide this field) 4. So I will get the total number of...
  14. J

    how to call a pre-defined query

    Hi; I have created query: qryNumProudcts. It works fine. Now I want to call this query, what is the syntax for this, by the way, since the query will return a number, how can I get this value, also, do I need create action query? Thank you very much, JT
  15. J

    add new records to a table

    thanks. it works great!
  16. J

    add new records to a table

    thanks, but why pop up a message window? it works great!!! but why pops up a warning message window says" you are about to append 4 row(s). once you click yes, you can't user the undo .......", I didn't ask for the confirmation, how can I disable the popup window? Thanks Wayne. JT
  17. J

    add new records to a table

    Same structure, all I want is: how to move a recordset data into a empty table (has same structure with the data in recordset) efficiently. Thanks. Jt
  18. J

    add new records to a table

    Hi; Wayne Wow, that is exactly what I want. 1. The database is MSAccess .mdb, no link table, no sql server. 2. The table will be empty before insert. 3. the real sql is like this: sqlGetCategoryDate = "SELECT tblVantive.[Date Entered] AS dateEntered, tblVantive.Status AS Status...
  19. J

    add new records to a table

    Here is the partial code: ==================== Dim rs As New ADODB.Recordset Dim sqlGetCategoryData As String sqlGetCategoryDate = "Select * from tblTest" rs.Open sqlGetCategoryDate, CurrentProject.Connection, adOpenDynamic, adLockOptimistic With rs If (.EOF) Then MsgBox "No Record In The...
  20. J

    add new records to a table

    hi; I have a recordset which contains some data, now the recordset is there, I want to add those data into a empty table. I can use "while loop" to grap the data from recordset row by row and add to the table, until .EOF is true. I am think if it is possible that I can copy the recordset and...
Back
Top Bottom