Deep into Access
Microsoft Access developer blog. Tips, code, what I'm working on, etc...
Sunday, December 14, 2014
Monday, October 27, 2014
How I Like to Use the Navigation Pane
First right click on the Navigation Pane bar and show the Search Bar. Then have the Navigation Pane display “All Access Objects”. Now you can enter a search string and the list of Access objects will be filtered to show you just the objects you are interested in. For me, this is the most convenient way to use the Navigation Pane.
Thursday, October 16, 2014
KeyedAccess Goes to 11
And don't forget, KeyedAccess supports all 64-bit versions of Access when you apply the 64-bit patch that is available from Peter's Software for free for registered users. Just ask us for it by e-mail.
Monday, November 11, 2013
Starting an Access Application in a Multi-User Environment
The new version includes the ability to create generational backups prior to opening the database.
It's really a must-have for me and I don't know why every serious Access developer is not using it! And it's free - http://www.peterssoftware.com/aps.htm
Tuesday, October 29, 2013
Introducing Halp
Halp is an integrated help authoring and display tool for Microsoft Access applications. More information is at http://peterssoftware.com/hlp.htm
Thursday, March 7, 2013
Normalization and Cascading Combo Boxes
Thursday, January 3, 2013
"The width of a Unicode text column must be an even number of bytes."
If this error message appears during normal run time, it is probable that the database has become corrupted and needs to be compacted or repaired.Yup. It's a corruption issue. But compacting and repairing the back-end database did no good. The corruption was apparently in the front-end database file. After I compacted and repaired the front-end, the problem went away.
Wednesday, January 2, 2013
The Amazing Eval Function
Dim strRtn As String
Dim strFunctionNameAndParms As String
strFunctionNameAndParms = "Date()" '<== WE'RE GOING TO CALL THIS FUNCTION
On Error Resume Next
strRtn = Eval(strFunctionNameAndParms)
If Err <> 0 Then
Select Case Err
Case 2425, 2426
'* The function is not found
MsgBox "The function '" & strFunctionNameAndParms & "' was not found."
Case Else
'* There was an error calling the function
MsgBox "Error when calling '" & strFunctionNameAndParms & "': " & Err.Number & " - " & Err.Description
End Select
Err.Clear
Else
MsgBox "Return value from '" & strFunctionNameAndParms & "' is: " & vbCrLf & strRtn
End If
On Error GoTo 0
Now, if the function above ("Date()", in this instance) doesn't exist, there's no compile error, the code keeps right on executing.
You could use this if you, for instance, wanted to optionally include an "Accounts Receivable" module in your accounting application. The main menu item for AR could use Eval to call the "StartAR()" function that lives in a "basAccountsReceivable" module that you can optionally include in your database. If the module is there, then the function runs and Accounts Receivable opens. If the module is not there, then you could have a message appear... something like "The Accounts Receivable module has not been included in this application build. To purchase this additional module please contact ..."
Friday, December 28, 2012
We Accept Bitcoins
We've started accepting payments in Bitcoins at our site. If you haven't heard of Bitcoin, it is a new digital currency that uses encryption to keep transactions safe over a distributed network. You can covert some money to Bitcoins, then use them as currency where they are accepted. There are some advantages and disadvantages to using Bitcoins, and lots of controversy including some very interesting discussions of whether Bitcoins qualify as actual "money" or not:
But one of the amazing things about Bitcoin for me is how secure payments are. You don't need to provide your name, address, phone, card number, security code, etc... as you do when you pay with a credit card. Bitcoins are designed to be used over the internet. You pay, and your "wallet" cryptic keys are identified by the distributed network and your account is credited or debited, and the recipient's account is credited or debited. No worries about someone stealing your credit card number or your identity. You just have to make sure your "wallet.dat" file doesn't get hacked, and you can do that with encryption or by some other similar means.
Is it the future of money? We'll see. For now it's a nice secure alternative to credit card payments.
Thursday, November 8, 2012
GetKeyState
=xg_CtrlAltMouseUp()In the declarations section of a standard module I put:
Const VK_LSHIFT = &HA0 Const VK_RSHIFT = &HA1 Const VK_LCONTROL = &HA2 Const VK_RCONTROL = &HA3 Const VK_LMENU = &HA4 Const VK_RMENU = &HA5 #If vba7 Then Declare PtrSafe Function GetKeyState Lib "user32" Alias "GetKeyState" (ByVal nVirtKey As Long) As Integer #Else Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer #End IfAnd the function looks like this:
Function xg_CtrlAltMouseUp() As Integer '****************************************************************************** '* Peter De Baets, author '* 11/2/2012 '* '****************************************************************************** Dim Marker As Integer Dim Rtn As Integer On Error GoTo Err_Section Marker = 1 'Return values '0 if the key is neither down nor toggled, '-127 if the key is down but not toggled, '1 if the key is toggled but up, and '-128 if the key is both toggled and down. If GetKeyState(VK_LCONTROL) < 0 And GetKeyState(VK_LMENU) < 0 Then DoCmd.OpenModule "Form_" & Screen.ActiveForm.Name, _ Screen.ActiveControl.Name & "_Click" Else End If Exit_Section: On Error Resume Next On Error GoTo 0 Exit Function Err_Section: Select Case Err Case Else Beep MsgBox "Error in xg_CtrlAltMouseUp (" & Marker & "), _ object " & Err.Source & ": " & Err.Number & _ " - " & Err.Description End Select Err.Clear Resume Exit_Section End Function
Access 2010: Replacing 32-bit API declarations with 64-bit
Friday, January 6, 2012
Introduction to Access Programming
Introduction to Access Programming
(Disclaimer: Please realize that getting involved in programming can be life-changing - not necessarily for the better!)