Category: Microsoft Office
Avoid error “2427 You entered an expression that has no value” when passing a parameter to a form
To avoid getting an error when passing a variable to a form, using If Not against the EOF (I believe means End of File) property. If Not Me.Recordset.EOF And Not Me.Recordset.EOF Then Dim stDocName As String Dim stLinkCriteria As String stDocName = “someform” stLinkCriteria = “[recordnumber]=” & Me.[recordnumber] DoCmd.OpenForm stDocName, , , stLinkCriteria Else MsgBox…
In VBA strip out characters which cause TSQL to fail
A simple way to strip out characters which can cause TSQL Code to break. Assumes the SQL commannd is in sqlstatement and you are passing a variable in me.comment, before executing the code. ‘Allows Characters such as , and ‘ which may break TSQL Code and Cause Injection sqlstatement = RTrim(sqlstatement) + “,’Me.comment & “‘”…
Disable Powerpoint 2016 extended display mode
Credit: https://web.archive.org/web/20240809174312/https://tips.timscomputer.com/disable-powerpoint-2013-extended-display-mode-via-registry/ Disable the extended display mode upon login, same as the link just modified the version from 15 to 16 Run the following as a batch file upon login @echo off reg add HKCU\Software\Microsoft\Office\16.0\PowerPoint\Options /v UseMonMgr /t REG_DWORD /d 0 /f
Microsoft Access 2010 loader
Credits (As what I consider the hard stuff was actually done by other people): TheSmileyCoder for the solid awesome little VBS File, this basically gets around the limitation of not actually getting Access to load another Access Database. At the time I only ever needed one modification (A rarely issue affected two P4 machines with…
Why use ACCDE and then ACCDR Access Front Ends
Nearly every single Microsoft Access “database” I use has a proper database attached instead of using the internal Jet Engine, this means data is not actually stored in the Access “database” and I therefore call them Access Frontends. Compiling your Access front ends to ACCDE provides a compiled copy of your Access Front End. I…
Outlook 2010: VBA delay sending of emails until the next working day if outside of reasonable hours
This Outlook 2010 VBA code was used to impose a time when emails could not be sent and were instead delayed until the next work day. This was put together (Credits go to key parts of this VBA are in the actual code) because the Managing Director where I work realised he was making people…