If your table is has a stuck lock in it then you may encounter one or more of the following errors:
THE ERROR:
When running an insert query - "Could not add # record(s) due to lock violations"
From code or currentdb.execute - Error # 3218 - "Could not update; currently locked"
Direct table editing - "Could not update; currently locked"
THE FIX:
Compact and repair the database should resolve the problem.
Thursday, August 13, 2009
Thursday, October 23, 2008
[Settings] [MS Access 2007] - Poor image quality in image control on report
Getting bad image resolution and quality on an Access report image control?
This poor image quality in MS Access report image control mysteriously shows up and had me scratching my head for awhile. If you are using the image control to show your images on a report, and though your image is good quality (and shows up fine outside of MS Access), is showing up with strange noise, purple effects and looks like this:

Then you need to change a setting to make the picture quality better.
FIX:
Go under the Office Button>>Access Options>>Current Database
Find where it says "Picture Property Storage Format" and change the setting to "Convert all picture data to bitmaps (compatible with Access 2003 and earlier).
Presto magico, your image is back to normal!
This poor image quality in MS Access report image control mysteriously shows up and had me scratching my head for awhile. If you are using the image control to show your images on a report, and though your image is good quality (and shows up fine outside of MS Access), is showing up with strange noise, purple effects and looks like this:
Then you need to change a setting to make the picture quality better.
FIX:
Go under the Office Button>>Access Options>>Current Database
Find where it says "Picture Property Storage Format" and change the setting to "Convert all picture data to bitmaps (compatible with Access 2003 and earlier).
Presto magico, your image is back to normal!
Monday, October 20, 2008
[Tip] - Shrink an Image Control on a MS Access 2007 Report
If you have put an image control on a report and expected to see the "Can Shrink" property then you are going to be looking for a long time. So how do you shrink all that white space when there is no image for that field? Here's how:
1) In the Detail section put the following code in the "On format" event.
If IsNull(Me!image_field) Then
Me.imageControlName.Visible = False
Else
Me.imageControlName.Visible = False
End If
2) You also need to set "Can Shrink" to "Yes" in the Detail section.
3) Next the secret... you need to create an unbound textbox and stretch it the height of the image control. This control will be doing the shrinking when the image control is hidden.
Finished!
1) In the Detail section put the following code in the "On format" event.
If IsNull(Me!image_field) Then
Me.imageControlName.Visible = False
Else
Me.imageControlName.Visible = False
End If
2) You also need to set "Can Shrink" to "Yes" in the Detail section.
3) Next the secret... you need to create an unbound textbox and stretch it the height of the image control. This control will be doing the shrinking when the image control is hidden.
Finished!
[Fix] - [Access 2007] - Can't delete linked table or edit a query that references the linked table with the error.
The Problem:
If you get the error
The fix:
Simply remove the offending character and relink the tables through VBA.
You can also create a new db and import all objects except for the linked tables.
If you get the error
'|' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long."when you try to delete a linked table or edit a query then you have just discovered a bug in Access 2007. I'm sure you have guessed but the problem lies somewhere within the linked table path. Either the name of the database or the path to the database has a character that Access 2007 doesn't like. I know this causes a problem with the apostrophe ' character and the square brackets [ ] and I'm sure many others also.
The fix:
Simply remove the offending character and relink the tables through VBA.
You can also create a new db and import all objects except for the linked tables.
Saturday, September 27, 2008
Welcome
Welcome to my new blog!
I plan on using this blog to show things I've discovered about Microsoft Access that take longer then 5 minutes to research and discover. I'll also to note things that I'm bound to forget that will be helpful references to me (and hopefully to you) in the future.
I plan on using this blog to show things I've discovered about Microsoft Access that take longer then 5 minutes to research and discover. I'll also to note things that I'm bound to forget that will be helpful references to me (and hopefully to you) in the future.
Subscribe to:
Posts (Atom)