access vba

  1. S

    How to activate a window without crashing?

    I want to activate a window to edit the content. However, when I use 'open Aggregated Files Workbooks.Open FileName:= _ "J:\recoding\report_002\P09P05\Aggregated Files.xlsx", UpdateLinks:=0 'open D001A Workbooks.Open FileName:= _ "J:\recoding\report_002\P09P05\List of RI match with...
  2. S

    VBA: How to save a new workbook in a specific location?

    I am trying to add and save a new workbook to a specific location. However, the code below does not function properly, i.e. no new workbook is created and saved in the drive. Please help. Option Compare Database Option Explicit Public Function DirPicker(Optional ByVal strWindowTitle As String...
  3. S

    FileDialog has Compile Error: User-defined type not define even when object library is referenced

    I am trying to create a file dialog with Microsoft Access 16.0 Object Library checked. However, the Compile Error: User-defined type not define still exists. Please help. My code below if it helps: Public Function DirPicker(Optional ByVal strWindowTitle As String = "Select Location to Save") As...
  4. S

    How to Import or link CSV with more than 255 columns in ACCESS?

    Hello, I have a .csv with more than 255 columns (395 exactly), I only need 3 columns but I cannot manipulate the source file manually, that is, I cannot divide it in two. The columns are: 131, 208 and 282 I have tried to do it by wizard but Access won't let me do it because it has more than...
  5. A

    Run time error 31532- Microsoft Access cannot export the data.

    Hi, I am using below code to export table from access 2016 to excel but getting error saying: Run time error 31532: Microsoft Access cannot export the data Public Function ExportToexcel_DD() Dim output_fl As String stName = "\PRO" output_fl = CurrentProject.Path & stName &...
  6. A

    MS Acces vba function to get thursday as first day of week in current month and Wednesday as last week in current month.

    Function for get Thursday as first day of week in current week month, this function returning first week as Thursday but first week of month in last month, But K need it will return only current month. For example if 1st date of month is on Tuesday it will return 1st date of month. Function...
  7. L

    Access Maximum Function: Return the second highest value across a series of 10 fields

    <!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/>...
  8. A

    Slowing code down?

    I'm writing vba to .addnew then .update a table. Once this is done, I want to clear the fields on the form that was used to update the table. SOMETIMES the longtext field is cleared before it's written to the table. If I take out the code that clears the fields, this is fixed. Why is it...
  9. jdsouza

    Shift Local MS Access database file to Web Server

    I have an Excel project which uses MS ACCESS for data storage. Works fine. The issue is that ... The project is used by multiple persons in multiple locations, making synchronization of data tedious (each one has to export what they have done via proprietary files and similarly import changes...
  10. T

    Excel Formula as a Access Expression

    Most of the formula functions I have used in this Excel doc. are not available as a Access expression. So to achieve what I have here > Retail rounding up to specific numbers (as well as calculating the retail) I have to start over in access Can anyone help or maybe I have to go to a access...
  11. A

    DLookup Format Issue

    I can't figure this one out. I keep stumbling my way through DLookups... Please help! x = Nz(DLookup("ID1", "AttendanceEvents", "EventDate= #" & txtRmvP & "# and USRI = ' " & fOSUserName() & " ' and (EventTypeCode = 'P' or EventTypeCode = 'SS-P' "), 0) I'm getting a mix of errors when I try...
  12. N

    Adding Unnecessary Blank row on import from Access 2010 (Windows 7)

    Private Sub cmdCreateChart_Click()Dim dbs As DAO.Database Dim qdf As DAO.QueryDef Dim rst As DAO.Recordset Dim objXL As Object Dim lngLastDataRow As Long Set objXL = CreateObject("Excel.Application") Set dbs = CurrentDb 'Get the parameter query Set qdf = dbs.QueryDefs("qryCharts") 'Open a...
  13. S

    Run Access VBA from Excel or Run Excel VBA from Access?

    Hi, I have a report that I am automating. The process consists in an Excel VBA Macro that gives the format to some excel files and saves them in an specific folder for access to take these files and import them into the corresponding tables. I was able to automate this process through an Excel...
  14. S

    Need to Compact and Repair from VBA code

    Hi, I have a VBA code that deletes some old data from my database and uploads the new data into it from some excel files. The thing is that the macro stops in the middle and brings me the error that the database reached it maximum capacity but when I click the Compact and Repair button the DB...
  15. H

    equivalent code from Access VBA to Excel VBA

    is there an equivalent code for DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, _ in excel vba? this is the code im trying to currently use in excel VBA: Private Sub CommandButton2_Click() Dim fDialog As FileDialog Dim varFile As Variant Set fDialog =...
  16. A

    Import the data from EXcel

    Hi Guys, I have a button in Access Database, but i don`t have a functionality. I need whenever i press "Import Button" it will automatically open the filer and i will navigate to select multiple files of excel anywhere in my hard drive. when i import the data it will automatically import all...
  17. A

    Access Query

    Hi, I need a favor from you guys, I already made a button in Access, I need to import the files from excel through that button on Macro, whenever we click the button it have to be import the excel files in database by matching the two columns. here is the example Database: Col A Col B...
  18. A

    Searching Criteria

    Hi Guys, Thanks in advance for helping me before, I need your help again guys. I have a database with me with 5 columns in it with the name of Name, Age, Address, Phone number and Position. I need a searching criteria for them to make the reports. I made the form on excel with the text boxes...
  19. W

    CurrentDb.Execute returning 'Too few parameters' error.

    I have been building a Sub in a standalone database and have run into an issue with running a query native to the same database. I have in the same sub as part of an If function, another CurrentDb.Execute and it works fine; however, when it gets to the next part of the Sub, the secondary...
  20. S

    Need help in debugging this vba code.

    Hi, I'm very very new to access vba. Here's what I did(I'll explain with an example) - (NOTE: If status is inactive then column 32, 33 should be "No" and red. If status is "Active" then only next strings should be searched in column 13) Example - columns are - Status(4th column), Group(13th...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top