Search results

  1. J

    Sum After a UNIONALL

    Hi everybody, Here's the code that I'm working on in an MS Access query: SELECT Year, plantCode, FreightCost FROM qryCorrectFreightCost UNION ALL SELECT Year, plantCode, FreightCost FROM qryOtherFreightSum GROUP BY plantCode, Year, FreightCost; This works fine, but afterward I want to Sum...
  2. J

    Handling DLookup's Null Return Value

    Hi everybody, I'm using VB and my code is below: quantityRegion = DLookup("[Quantity]", "tblSalesData", "[regionCode] = " & i & " AND [Year] = " & yr) If (IsNull(quantityRegion)) Then 'nothing Else 'bunch of code ... End If Sometimes quantityRegion results in a Null value, and...
  3. J

    Referencing a cell in an Access table with VB

    Let's say I have a Microsoft Access table called tblConstants in my database program (which 'conveniently' has a VB back-end). How would I go about referencing a specific field of a particular record (and therefore, a specific cell) using VB code? I am in dire syntax straits here; hopefully a...
  4. J

    Automate Linked Table Manager?

    Ok. I've got a database and it has ONE linked table in Excel. Let's call it tblTable, for argument's sake. In order to proceed from the database start screen, the user must click a command button, which executes some VB code and opens up the main database window. Now here's what I want to...
  5. J

    Get Home Directory

    I have an Access database linked with VB. Here's what I'd like to do: Use the TransferText method to create a file (which I have done) and save it in the same directory as the Access database. Here's what I'd like to know: Is there is a built-in VB function for retrieving the path name of the...
  6. J

    VBA Access Database to Excel

    I have recently taken over the duty of maintaining an Access '03 database linked with VB. The program employs a series of recordset objects and connection objects associated with type ADODB. Thing is, I have absolutely no idea what the distinction is between DAO, ADO, and ADODB. Anyone have a...
  7. J

    Access Save to Excel File

    I'm fairly new to Access/VBA but I know Excel like a brother. I have a database in Access featuring a VB-module calculation process that perform operations on queries and tables. I want to write a RecordSet to an Excel file so that each time the calculation process is executed, a new Excel file...
Back
Top Bottom