Showing posts with label Access2007. Show all posts
Showing posts with label Access2007. Show all posts

5/08/2009

VB - Tricky little error

I copied some code today for an Access 2007 project. Just couldn't get it to work. I finally looked very closely at the code. Do you see the difference between the two lines above? The top line works correctly. The bottom line does not.

The bottom line looks like the code that I copied. Notice the opposite facing quote marks. They don't work in Access 2007 VB. Go figure. Looks like the author of the post that I got this code from was writing his article with an MSWord editor and it "corrected" his code for him.

4/23/2009

Access2007 - Secret Trick 01

I wanted a drop-down (ComboBox) with two columns. The first column holds the ID of the row I'm looking at and the second column holds the information, in this case the Subsystem. I want to see Subsystem in the drop-down but use the ID in my database. I don't want the ID to be displayed in the drop-down.

Here's the secret. Set the first column width to 0! The Column Widths property is a comma delimited list of widths so you can define it for every column displayed, or not display a column.