Search results

  1. K

    How to Export a query to Excel if Access file is read only(located on SharePoint)

    Hi, I have an access program that is stored on a SharePoint site. I want to be able to export report to the computer even if I just open the access program as read only. Here's my code: Private Sub btnExport_Click() On Error GoTo btnExport_Click_Err Dim db As DAO.Database Dim strSQL As...
  2. K

    DoCmd.OutputTo: Store path location selected by user to a string

    I am using this code with the OutputFile set to "" so the user can select the directory on where they want to store the exported template. My issue is I'm trying to figure out if I could get the file path and the file name and store it on a string so I could use it for something else.
  3. K

    VB Access Loop Problem: exits loop prematurely even if conditions are met

    I am filling up a listbox and I have this code which exits prematurely even if conditions are met. Starting value is 0.1 dblHighest = rs.Fields(0).Value 'dblHighest = 3.06 dblDCR = 0.1 For j = 0.1 To dblHighest If dblDCR <= dblHighest Then lstDCR.AddItem...
  4. K

    VB Code: Replace Main Row if a part is Unapproved or Obsolete

    Help Please -> VB Code: Replace Main Row if a part is Unapproved or Obsolete I have an access table that I download from a specific site that looks like the one that I attached. The problem is the format of the table. I want to write a code that will replace the main row of the PART NUMBER if...
  5. K

    Track Changes made by Update query

    Is there a way to show all rows that was updated by an update query? I have a tblMCN where the data comes from a temp table. If the MCN is new it goes from temp table to tblLogs to tblMCN(using append query) then just updates the tblMCN using update query. My dilemma now is to show the users...
  6. K

    Highlight Items in a Listbox using a '>=' or '<=' button?

    I have a listbox that have a list of numbers: lstDCR: 0.37 0.45 0.56 1.02 2.05 5.67 I'm trying to create a code that will highlight numbers greater than or equal to when a '>=' is clicked(same thing with less than). Is there a command that will do this: lstDCR.Highlight?
  7. K

    Track Changes in a Table?

    I've been trying to figure out a way to do this one. I have a table where the first 2 columns can be the same on any rows provided that the timestamps are different. ex: Board_____Part no____Timestamp______Description____Status abc_______123_______7/1/2011_______description____Approved...
  8. K

    Track changes using query

    Hi, I am stuck with this tracking problem, here is an example: Log Table A B C D E Apple W.Apple Approved Not Approved 7/19/2011 Apple W.Apple Approved Approved 7/4/2011 Apple G.Apple...
  9. K

    Transfer Filtered Table/Query using Docmd.Transferspreadsheet

    Hi, I have this code that's been working perfectly (DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, strCmbBOM, strFullPath & strFileName & ".xls", False). I'm just curious if I could add a feature that will be able to export a filtered table/query to an excel spreadsheet. I tried...
  10. K

    Unwanted Parameter Dialogue Box

    Hi, I've been having a hard time figuring out why my query always shows up a parameter dialogue box with this query design: Build Date______ Weeks Left: DateDiff("w",Now(),[Build Date]) ______ Priority: IIf([Weeks Left]>7,"Low",IIf([Weeks Left]>3,"Medium","High"))...
  11. K

    Filter option vba code not working

    I've made a code to filter a subform but it returns an empty table and I'm not sure why. Here's the code: Private Sub btnFilter_Click() Dim strFilter As String strFilter = cmbStr.Value ' ex: combo box choice: 20-N0001-A1 MsgBox strFilter 'for debugging purpose: displays 20-N0001-A1...
  12. K

    Extract first record on a specific column and store in in a table

    I just want to ask how do I get the first record of a specific column so I can store it in a new table. ex col a col b colc 123 456 789 abc cdf sdw I just want to get anything that is first of col b (which is "456" in my example). I will have to define a string and store it...
  13. K

    Run Time Error 3001: Invalid Argument

    I've been experiencing this error and I don't know the reason why. I've checked my syntax and it looks good. Any suggestions? Private Sub CreateBOMTable() Dim curDatabase As DAO.Database Dim tblBOM As DAO.TableDef Dim colMCN As DAO.Field Dim colPartType As DAO.Field Dim...
  14. K

    Open any excel files in access

    Hi, I would like to know how to open any excel files from any directory and extract specific columns and copy it to an Access table. Can I use wildcards in the vba code? This is the code I used in Excel to open any excel files but the code doesn't work when I tried using it on Access: Sub...
Top Bottom