Archive for category code
Pull the email domain from a string VBA Access visual basic
Right([HomeEmail],Len([HomeEmail])-InStr([HomeEmail],”@”)) If the field containing the emails has and null or empty strings in it make sure you set the criteria to ” Is Not Null And Not “” ” or else you will get the error: “Data type mismatch in criteria expression.“
VBA: Format a date field in MS Access
There are a ton of ways you can do this, but one of the easiest is to simply save the field with all the numerals for the date into a “Date” format under the Table field properties. But before you do that, you have to add some formatting so that Access 97 recognizes it as [...]
Count the number of times a word appears in a document macro
Convert ODBC to OLE connection string
Posted by Mitch in code, Web Development on November 30, 2010

This need came about when a database of mine stopped working with a Godaddy hosting account (kept getting a 500 error). The page is ASP and the database is Access 2000 with a dsn-less connection string. After their support messed with it, the page came back up, but now it had this intermittent connection error: [...]
Which website visitors can’t Google Analytics track?
Posted by Mitch in code, Internet, Web Development on November 5, 2010

1. Attention Deficit Web Surfers. As then-United States Senator Ted Stevens will tell you, the internet is a series of tubes. Tubes filled with water naturally in which Web Surfers play. Some of these people have a hard time letting a webpage fully load before they decide to click onto the next image or page [...]
ASPMail not working on Planet Online hosted website
Posted by Mitch in code, Web Development on October 27, 2010

A client noticed they weren’t receiving any more emails from their website form so I tested out the ASPMail function and it was throwing an error: Mail send failure. Error was Cannot create file This error is due to an issue with the TMP or TEMP directory on your IIS server. Refer here for more details. [...]
Format text Justia.com MS Word macro remove line breaks

One of my users was pulling some text from a legal website (www.justia.com) and asked me if I could help her paste it into MS Word. I thought it would be as simple as paste special to delete the formatting, but that doesn’t really cut it here (pun intended). Pasting as formatted text(RTF) is the [...]
Myspace profile hack code from 2007
Posted by Mitch in code, Web Development on September 6, 2010

Just came across an old email where I had sent myself a code I found on my Myspace profile 7/25/2007 Dunno how they hacked into it because I’ve always kept pretty good passwords, but they did and here is what the hoodlums posted in my HEROES section: <div name=”QTGrl7318″ id=”name” style=”display:none;”> <img width=”0″ height=”0″ src=”http://love.gif” [...]
How to setup a Podcast on your website

Embedded Flash MP3 Audio Player This isn’t the definitive reference for Podcasting on your website, but it will help you post an MP3 to any website using a slick little Flash player. This article will be expanded as features are added. Steps: Download this MP3 Player for WordPress: http://www.1pixelout.net/code/audio-player-wordpress-plugin/ Unzip the files and upload only [...]
Remove a CSS File from a webpage dynamically

It’s actually quite easy to remove a CSS or JS file from a webpage dynamically, it’s a little Javascript function: function removejscssfile(filename, filetype) { var targetelement=(filetype==”js”)? “script” : (filetype==”css”)? “link” : “none” //determine element type to create nodelist from var targetattr=(filetype==”js”)? “src” : (filetype==”css”)? “href” : “none” //determine corresponding attribute to test for var allsuspects=document.getElementsByTagName(targetelement) [...]
