Developer
191 TopicsLinking Access to Excel does not work
I have created a simple Access that is connected to a linked table to an Excel file as a data source. I can run the Access without any problems. It accesses the data and everything is fine. But when my colleague wants to run the Access, she gets the following error message "Microsoft Access “C:\Users\User\ [Source Path] .xlsx” is not a valid path. Please ensure that the path is entered correctly and that you are connected to the server where the file is located." We use OneDrive/SharePoint in our company and the colleague has access to the folder where the Excel and Access files are located. But it doesn't work. I think it's the path, as it seems to be local. But I don't understand why. This Access in turn serves as a source for another Excel (the target file). There it has a similar error message: ‘’Microsoft Excel [DataFormat.Error] “ [File Name] .accdb” is not a valid path. Please ensure that the path is entered correctly and that you are connected to the server where the file is located." I can open and run both the Access and the target Excel without any problems. Thanks a lot in advance. I appreciate your help a lot.136Views0likes3CommentsAccess changing lettercase - redux
This has probably been beaten to death, but I'm fuming, so here goes. I want Microsoft to DO SOMETHING to help. Access has the highly annoying habit of changing lettercase on identifiers, seemingly at random. This is a real pain when using add-ins like MSAccessVCS, which makes it possible to use git for source code control. Here' what I've deduced is happening: There exists a dictionary/symbol-table containing every identifier used in a project. The symbol table contains ALL identifiers, including those defined by MSAccess, referenced libraries, and your code. Searching that table is case-insensitive, but it stores the canonical version of the identifier with case preserved. Normally, when you type an identifier that already exists in the table, the VBA editor "corrects" the lettercase of your entry to match the table's entry. The extremely annoying part is that sometimes that last step works in reverse. You type an existing identifier, but with a different lettercase. Instead of correcting what you typed to match the table, it instead updates the table with the version you typed, and decides that's the way future and existing identifiers should be spelled. Here's a recent example. I tried to create a class module constructor (Class_Initialize) but typed it "class_initialize" implicitly expecting that the VBA editor would "fix" it. Instead, it updated the symbol table and set the canonical lettercase to the all-lowercase version... and then proceeded to change the lettercase on the Class_Initialize() method in all my class modules. It has now decided the canonical lettercase is "class_initialize" and that's what it "corrects" to from now on. Of course, when I did the next MSAccessVCS export, git showed a bunch of unwanted (but cosmetic) changes. This pollutes the changeset and makes source control more difficult. THIS. IS. A. BUG. My workaround is, when starting a checkin, I go through the list of changes and group all such changes into one commit called "VBA Artifacts". But come on, this shouldn't be necessary. At least let us know WHY this happens, and give us some control of the process. A way to specify/correct the canonical casing would help.177Views1like8CommentsMsaccess Enhanced Message Box - Office update issue
This Code has been working for 10 years. Then, an Office update causes multiple instances of the form to remain open. If I revert to 16.0.17531.20120 all is well. This creates multiple instances: ' Create the MessageBox Dim F As New Form_frmEnhancedMessageBoxFormDialog This is supposed to close the form. ' cleanup Set F = Nothing Every time a message is displayed, a new instance of the form is opened, and after the user responds, it is hidden. The cleanup does not work. I tried unloading and closing the form but they are not part of the forms collection that can be referenced. I waited to see if a Microsoft update would fix the problem, but so far, no luck. Has anyone experienced the same issue? The code came from here: https://datenbank-projekt.de/projekte/improved-enhanced-message-box-ms-access However, a request for paid help was unanswered. After spending a morning with ChatGPT trying various fixes that did not work, I wondered if any other developers had any ideas or perhaps had experienced a similar issue. Thanks, Finlay McMillan '----------------------------------------------------------------------------- ' Plain Text Replacement for the standard MsgBox '----------------------------------------------------------------------------- Public Function Box(ByVal Prompt As String, _ Optional ByVal Buttons As VbMsgBoxStyle = vbOKOnly, _ Optional ByVal Title As String, _ Optional ByVal HelpFile As String, _ Optional ByVal HelpContextId As Long, _ Optional ByVal ButtonDelay As Long = -1, _ Optional ByVal AllowBeep As Variant, _ Optional ByVal AllowCopyToClipboard As Variant, _ Optional ByVal AllowSaveToFile As Variant, _ Optional ByVal LabelButton1 As Variant = Null, _ Optional ByVal LabelButton2 As Variant = Null, _ Optional ByVal LabelButton3 As Variant = Null, _ Optional ByVal NoStrEsc As Variant, _ Optional ByVal DismissID As Variant = Null, _ Optional ByVal AutoCloseSec As Long = 0, _ Optional ByVal DefaultButton As Long = 0, _ Optional ByVal BGColorButton1 As Long = -1, _ Optional ByVal BGColorButton2 As Long = -1, _ Optional ByVal BGColorButton3 As Long = -1, _ Optional ByVal BoxIsModal As Boolean = True, _ Optional ByVal BoxIsOnTop As Boolean = True, _ Optional ByVal DelayShow_Countdown As Boolean = False) _ As VbMsgBoxResultEx ' If the dialog was previously dismissed, don't display anything at all If (Buttons And 7) = 0 And GetDismissIDValue(DismissID) Then Box = VbMsgBoxResultEx.vbOK Exit Function End If ' Create the MessageBox Dim F As New Form_frmEnhancedMessageBoxFormDialog F.ParenthWnd = GetParentWindowHandle() F.Title = Title F.Buttons = Buttons F.HelpFile = HelpFile F.HelpContextId = HelpContextId F.ButtonDelay = IIf(ButtonDelay <= 0, DefaultButtonDelay, ButtonDelay) F.AllowBeep = IIf(IsMissing(AllowBeep), DefaultBeepAllowed, AllowBeep) F.AllowCopyToClipboard = IIf(IsMissing(AllowCopyToClipboard), DefaultCopyToClipboardAllowed, AllowCopyToClipboard) F.AllowSaveToFile = IIf(IsMissing(AllowSaveToFile), DefaultSaveToFileAllowed, AllowSaveToFile) F.SavedTextFileFolder = DefaultSavedTextFileFolder F.IsRichText = False F.LabelButton1 = LabelButton1 F.LabelButton2 = LabelButton2 F.LabelButton3 = LabelButton3 F.DismissID = DismissID F.AutoCloseSec = IIf(IsMissing(AutoCloseSec), DefaultAutoCloseSecDelay, AutoCloseSec) F.DefaultButton = IIf(IsMissing(DefaultButton), DefaultDefaultButton, DefaultButton) F.BGColorButton1 = IIf(BGColorButton1 < 0, DefaultBGColorButton1, BGColorButton1) F.BGColorButton2 = IIf(BGColorButton2 < 0, DefaultBGColorButton2, BGColorButton2) F.BGColorButton3 = IIf(BGColorButton3 < 0, DefaultBGColorButton3, BGColorButton3) F.BoxIsModal = IIf(IsMissing(BoxIsModal), DefaultBoxIsModal, BoxIsModal) F.BoxIsOnTop = IIf(IsMissing(BoxIsOnTop), DefaultBoxIsOnTop, BoxIsOnTop) F.DelayShow_Countdown = IIf(IsMissing(DelayShow_Countdown), DEFAULT_DELAYSHOW_COUNTDOWN, DelayShow_Countdown) If IIf(IsMissing(NoStrEsc), DefaultNoStrEsc, NoStrEsc) Then F.Prompt = Prompt Else F.Prompt = UnEscStr(Prompt, toHtml:=False) End If ' Make it visible and wait for the user until we get the result Box = F.ShowModal() ' Keep the last result just in case the user needs it again later m_Result = Box ' Set focus back to the parent form On Error Resume Next WinAPISetFocus F.ParenthWnd On Error GoTo 0 ' cleanup Set F = Nothing57Views0likes3CommentsBUG REPORT MS ACCESS: F5 Key in VBA Editor Behaves Like F8 – Code Runs Line by Line After Breakpoint
Issue Summary: In the VBA Editor (VBE) of Microsoft Access (Microsoft 365, 32-bit), I'm experiencing a critical issue during debugging: When I enter break mode (e.g., hit a breakpoint) and press F5 (or click “Continue”), the code does not resume execution normally — instead, it continues line by line, exactly as if I were pressing F8. This completely breaks normal debugging flow. Things I Tried (none fixed the issue): Compact and Repair database. Ran Access with the /decompile switch. Created new, clean databases. Reinstalled Office 365 completely. Ran both Quick Repair and Online Repair. Used Office Deployment Tool to downgrade to older versions. Cleared .exd, vbaProject.bin, and temp VBA cache files. Verified it's not a keyboard or hardware issue. Disabled OneDrive sync (though my Documents folder is still redirected). Checked VBE-related DLLs (VBE7.DLL), and user registry entries. Same result on other PCs in my workplace. ✅ What Did Work (But Not a Practical Solution): I created a new Windows user account, re-ran Access there, and F5 worked normally again, even using the same Access application where the issue originally occurred. This confirmed that the bug is profile-specific, likely tied to a corrupted configuration or setting in the original Windows user environment. ❌ Why That’s a Problem: Creating a new Windows profile is not viable in a production/development environment: I use licensed OCX controls (Viscom) tied to my current user profile — reactivation would require additional purchases. Other tools are already configured. Recreating the full environment is costly and time-consuming. 🧠 How I Discovered This: When I purchased a new laptop and did a clean install of Windows and Office, the issue did not occur at all, even when running the same Access database file. That’s when I realized it was tied to something in the Windows user profile. With help from ChatGPT, I identified that the issue is likely due to corrupt user-level configuration of the VBA editor, which is not easily reset or exposed to users. 🔎 Possible Causes: Corrupt configuration in %APPDATA%, registry, or synced files. VBA/VBE state incorrectly cached. Debugger logic affected by user-specific flags or crash residue. 📢 Request to Microsoft: Please consider providing: A tool or command to reset all VBE/VBA user settings (without creating a new user account). Documentation on which files or registry keys may affect debugging behavior. An investigation into why F5 acts like F8 and what triggers this silent corruption. Thanks four your help23Views0likes0CommentsHow to make a Saved Export
Hello All, My very first post in the MS-Access lounge. I need to automate these steps: Press F-11 to get to the All Access Objects pane. Select a Table named Priority The Priority table has a Date field and I click on the arrow at the right edge of the field name. I move the mouse to the date Filter option in the dropdown menu. I select Today. Now the table has all priority with today's date in the date field. I click on the left most corner to select all the table rows. I copy the selection I paste into MS-Excel. Is there a way to save all these steps into a Saved Export so that it can be made easier and standardized. If it can be done without the use of VBA so much the better. Still using Access 2007 - 2016 file format Thanks in advance. Gigi...147Views0likes7CommentsTRYING TO BUILD A LOGIN BUTTON/PASSWORD
Hi there, I hope you will be able to help me. I am very new to access and managed to build a small database for my work, mainly from watching you tube videos and reading google information however, I want to start upping the anti a little more by adding a level of security so users need to input a user name and password to gain access to the database. My first stumbling block is the 'build event'. Whenever I right click on my login button, it takes me to the macro screen yet when I watch videos online, you get the option to select code builder, I cannot for the life of me see how to change this, any advise please would be greatly received. Many thanks, Andy145Views0likes5CommentsStart Access from .bat file as specific user?
Hi, I need to run an Access macro from a .bat file as a different user. Is there a way to use the start command and the runas command at the same time? I want to do something like this: runas /user:Me start /b "C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.exe" "\\Data\MyDatabase.mdb" /x TheMacro Anyone know a good way to do this?Solved87Views1like1CommentBug in Microsoft Access's Number Filters for Less Than & Greater Than options
Dear Microsoft Office 365 Development Team, I am submitting this bug report regarding an issue I have encountered with the Number Filters in Microsoft Access within Office 365. Specifically, the "Less Than..." and "Greater Than..." filters do not behave according to basic mathematical principles. Here are the details of the issue: When applying the "Less Than..." filter and entering a value (e.g., 250), the filter includes records equal to 250 in the result. The correct behavior should be to display records with values strictly less than 250, i.e., from 1 to 249. Similarly, when applying the "Greater Than..." filter and entering a value (e.g., 250), the filter also includes records equal to 250. The expected behavior should be to show records with values strictly greater than 250, i.e., from 251 to 500. It appears that the filter logic is not following the expected mathematical rules for "less than" and "greater than" comparisons. Could you kindly investigate this issue and confirm once a fix is available? I would also appreciate it if you could provide details about when the new, fixed version of Microsoft Access will be released. Thank you for your attention to this matter. Kind regards,Solved106Views0likes2CommentsHow to restore selected ribbon tab after report with a custom ribbon is closed?
We have a database which has two ribbons. A Switchboard ribbon with multiple tabs and a hidden PrintPreview ribbon used through report “Ribbon Name” property. The PrintPreview ribbon has startFromScratch="true". The tabs of Switchboard ribbon have multiple buttons use for opening a corresponding report. The problem is that each time a user opens and closes a report the Switchboard ribbon jumps back to first tab. Example: Switchboard has tab1, tab2. The tab1 has button1 and button2 to open report1 and report2 correspondently. The tab2 has button3 and button4 to open report3 and report4 correspondently All 4 reports have “Ribbon Name” property set to PrintPreview ribbon. User clicks report3 from tab2. The report3 is opens, Switchboard ribbon is hidden and PrintPreview ribbon is visible. User close report3. The Switchboard ribbon became visible and tab1 is an active tab. Now user need to click on tab2 again if he/she want to open report4 or even report3 again. If we extrapolate this situation for 17 tabs on Switchboard ribbon with each tab having ~20 reports we can see user frustration with moving focus back to first tab. Is where a way to remember which tab in Switchboard ribbon was active before opening PrintPreview ribbon and make it active after report is closed? Note: the only possible solution I found was with use of Ribbon Accessibility here www.wordarticles.com/Shorts/RibbonVBA/RibbonVBADemo.php It is a quite complicated and does not works under Access 365 too. Any help would be appreciated! Thank you!Solved107Views0likes4Comments