Get ThinOptics

ThinOptics have changed my life. Ever been somewhere and you can’t read your phone or even a menu at your favorite restaurant because you left your glasses behind. With ThinOptics they stick to the back of your phone. Tiny reading glasses right there when you need it most. I always have my phone on me – now I always have a pair of glasses. Brilliant idea. Super deal as well. Replacement glasses are FREE – yup free – for life.

HIGHLY recommend. Check them out. The link below gets you a 15% discount.

Check out ThinOptics

Too Many Excel Styles?

From time to time I get excel files that have what seems to be 10,000 styles embedded in it. I’ve found the more styles the slower Excel works and in some cases errors actually occur. Just recently I wasn’t able to apply a style at all – even through I had 1000’s available in the selector.

I found this tool that clears all of these styles back to the basics. Once I ran this tool I had no more issues with the spreadsheet. Enjoy.

XLS Styles Tool

Test Parameter Values for ADODB Connection

If you’re running ADODB to run a stored procedure on say SQL Server.  It’s helpful to know if the parameters you’re expecting to be passed actually are.  Add the For Each code block below just prior to the .Execute and you’ll see the param values in the immediate window

 Set cmd = New ADODB.Command
 With cmd
 .ActiveConnection = CurrentProject.Connection
 .CommandText = "spInsertOrUpdate_OPTJurisCode"
 .Parameters.Append .CreateParameter("RETURN_VALUE", adDouble, adParamReturnValue)
 .Parameters.Append .CreateParameter("@ID", adInteger, adParamInput, lngID)
 .Parameters.Append .CreateParameter("@SourceID", adInteger, adParamInput, CInt(gblSource))
 .Parameters.Append .CreateParameter("@ActionType", adVarChar, adParamInput, 4, gblactionType)
 .Parameters.Append .CreateParameter("@StateID", adInteger, adParamInput, , Me.cmbState)
 .Parameters.Append .CreateParameter("@City", adVarChar, adParamInput, 75, Me.txtCity)
 .Parameters.Append .CreateParameter("@Zip", adVarChar, adParamInput, 7, Me.txtZip)
 .Parameters.Append .CreateParameter("@JurisCode", adVarChar, adParamInput, 50, Me.txtJurisCode)
 .CommandType = adCmdStoredProc
 .CommandTimeout = 0
 
 'Test Param Values
 For Each prm In cmd.Parameters
 Debug.Print prm.Name & " : " & prm.Value
 Next
 
 .Execute
 End With

 

Refer to a Subform from another form

This took a while to figure out but Art Polk came to the rescue.

I had a popup form that when a button was pressed I needed to update the subform of the form which created the popup I was currently in.  Basically, I used a popup to edit one of the records in a data grid.  My objective was that once the update was processed the grid would refresh displaying the change…

 

Forms!frmParentFormName.Controls(“frmSubFormNeedingTheRefresh”).Form.Refresh

That’s it