Search results

  1. R

    VBA to populate userform listbox from a table

    I am trying to find the correct VBA syntax to populate a listbox (on an Excel userform) with column headings, from a table reference. The following code works but does not display column headings: ****************************************************************************************** Dim...
  2. R

    Multiple values in query criteria from one form combo box

    I have a combo box on a form that has only three values, ‘All’, ‘Pet’, or ‘Shoe’. The logic I’m trying to achieve is as follows: If selected branch = “Shoe” then Branch = “01” If selected branch = “Pet” then Branch = “05” If selected branch = “Both Shoe & Pet” then Branch = “01” or “05”...
  3. R

    Trying to populate form text boxes from a query

    Can someone tell me what’s wrong with this code? I have a NotInList event that displays the Add New Record button and calls the below function. This function (PopulateItemTxtBoxes) is supposed to run a query to collect all the item information needed from a set of tables, populate/store that...
  4. R

    Function to pull data from a query into text boxes on a form

    Can someone tell me what’s wrong with this code? I have a NotInList event that displays the Add New Record button and calls the below function. This function (PopulateItemTxtBoxes) is supposed to run a query to collect all the item information needed from a set of tables, populate/store that...
  5. R

    VB Runtime error 1004 trying to set Bold property in Excel spreadsheet

    I have a button on a form that exports a datasheet form to an excel spreadsheet. I have coded a VB function to do some formatting of the exported spreadsheet. All of it has worked up to this point. One of the things it does is subtotal the worksheet. I have just received a request to Bold the...
  6. R

    Excel not ending after launching through Access VB code

    I have a datasheet form that exports as an Excel file (through an embedded macro on a button click event). I then call a function (in that same macro) that opens the Excel and the file and applies conditional formatting and subtotaling to it. This works fine except that after I close the Excel...
  7. R

    Item not found in collection error

    I am trying to establish a recordset in which I can pull information from a query to populate text boxes on a form. I want the query results to be based on two fields on the form (item & warehouse). My original code was giving me the “too few parameters. expected 2” error. I had the parameters...
  8. R

    Custom data for first row (index 0) for combo box

    I have an unbound form with a combo box that lists item numbers. The row source for the combo box is a lookup query. I started with using the following to at least get the box to always display the first item either on Form Load or on Got Focus (this works fine): Me.cboItem =...
  9. R

    Explain SQL UPDATE statement punctuation

    Single & Double quotes? I had been having trouble finding VB code to update records in a database. I found many different examples but the following is the only one I found that actually worked for me. Dim updateRec as String updateRec = "UPDATE dbo_HB_ITEMMASTER SET...
  10. R

    SQL error in Access query

    I need to determine the last transaction for an item. I have a transaction table that has a date column and a time column. Because I need the max date and then the max time within the max date, a single Access query did not work. I can do it with multiple queries but was trying to keep it to...
  11. R

    Prevent a blank or null value in a combo box on a form

    How to prevent a blank or null value in a combo box on a form? I have an unbound form that has a combo box (cboLotNum)with a OnNotInList event. The box gets populated from a lookup query if a record exists. Edits are allowed so the user can type a new lot number (if one doesn’t exist) or...
  12. R

    Set object values on form when new item entered in combo box

    Using Access 2007. I have an unbound form with 3 objects, 1 combo box and two text boxes. The combo box uses a query as its row source. It grabs three columns from the query (Item, Lot#, and DateChanged). It has an “After Update” procedure that populates the two text boxes with the Lot# and...
  13. R

    hello

    Coming to you from the NorthEast US. Not new to Access but fairly new to Access programming with VB. Starting to create Access applications and hoping to find help getting over the obstacles of a newbie. Look forward to being a part of your Access community! :)
Back
Top Bottom