Search results

  1. S

    How to move item in listBox up and down access VBA?

    I have a list box contains 10 times . I have UP and Down buttons to move item up and down. My VBA works only if i set listbox multiselect property to 'None'. For the multiselect=simple option it throws error like in valid use of null in this line of code sText =...
  2. S

    Recordset is showing as empty But Query wizard Returns Records

    I'm trying to write record set contents to excel. My query runs perfect in access query wizard, but recordset showing as null. My VBA code Dim cnn As ADODB.Connection Dim recordst As ADODB.Recordset Dim strSQL As String Dim strPath As String Dim appXL As...
  3. S

    How to retrieve column data using sql query

    I'm trying to retrieve data based on the contents of one column. sample table Description EID Basecode ----------- ---- --------- ssdad 1001 S2378797 gfd 1002 S1164478 gfdsffsdf 1003...
  4. S

    How to retrieve column data other than specified in 2 sql queries

    I have a table (tbl1) contains sample records in Basecode column like S2378797 , R1165778 , W1165778 , N1165778 Description EID Basecode ----------- ---- ---------...
  5. S

    How to pass a string in excel vba to access vba

    I want to pass a string aPath contains path of the active workbook to access vba module or sub. Below is my excel vba code that will open access db form. How do i pass the string value to access vba. Dim aPath, aDbase, aDSource, aTable, exePath As String Dim fileParam As...
  6. S

    How to pass listbox name as parameter in a function access vba

    I've a method **querylistboxitems** and i want to call this method in several click events, only difference is listbox,dropdown values change based on the event i call. Public Sub querylistboxitems(lstbox As listbox, dropdown As ComboBox) Dim drpdwnvalue As String drpdwnvalue =...
  7. S

    Empty combobox values when access form loads vba

    I want to empty the combobox every time when form loads. Using the below code Private Sub Form_Load() combo1.RowSource = "" End Sub But Combobax is not emptying.
  8. S

    Empty combobox values when access form loads vba

    I want to empty the combobox every time when form loads. Using the below code But Combobax is not emptying.
  9. S

    How do I use a variable from a different function in another function

    I have one method Public CurrentFileNameNoExtension As String Public Sub importexcelfile() CurrentFileNameNoExtension ="Filename" 'do something End Sub I want to use **CurrentFileNameNoExtension** value in **onEnter** event of the dropdown list(**cmvalues**) event. That...
  10. S

    How to move up and down selected item in access form listbox

    I've designed access form with one listbox and added 'up' and 'down' buttons to move up and down the selected item in the listbox. i.e from its selected position to one item up when 'up' button clicked and same as one item down when down button is clicked. Any VBA code will do this functionality?
  11. S

    Does access VBA has Listbox.List method as excel VBA has

    I'm writing code in access vba for the list box selected item to move up and down. Needs to use .List Property in access . But it throws an error says no method or member found. Any replace method with .List ? Private Sub cmdUP_Click() Dim i As Long Dim leaveAlone As Boolean Dim pos As Long...
Back
Top Bottom