Access Expression On Click Error for Form Button

I use a couple of Access databases to run my business, and things usually go smoothly. Recently though, an error appeared when I clicked a button on the Main Menu form. The button was supposed to open a data entry form, and had worked perfectly for years. This time though, the other form didn’t open, and an Access Expression On Click Error appeared.

Continue reading “Access Expression On Click Error for Form Button”

Links in Outlook Email Not Working

You probably get lots of email messages, and a good portion of those have links in them. Maybe a co-worker wants you to look at an online article, or a client sends you a link to check.

I get lots of emails like that, so it was alarming to get this message in Outlook recently, when I clicked a link.

Continue reading “Links in Outlook Email Not Working”

Excel Errors With Access Database

Recently, I’ve heard from a couple of people who were getting strange errors in Excel, when they tried to get data from an Access database. In both cases, things had been going smoothly for a long time, then suddenly stopped working. What was going wrong?

These Excel errors were different from the Read Only database problem that I wrote about before.
Continue reading “Excel Errors With Access Database”

Hide Date Picker Calendar in Access Form

I’ve been working on a client’s database, in Microsoft Access, and one of the data entry forms has several fields for dates and times.

There’s a nice Date Picker feature that shows a calendar icon, if you click in a date field text box. Click that icon, and a popup calendar appears, so you can select a date, instead of typing it.

datepicker01

Continue reading “Hide Date Picker Calendar in Access Form”

Hidden Form in Access Closes Unexpectedly

Today I solved a nagging problem with an Access database, so I’ll share the solution here, in case it helps someone else.

In an Access database that I built, there is a Login form, where the users select their name from a drop down list.

accesslogoform03

Then, when they click OK, the Login form is hidden, and a data entry form opens.

accesslogoform01

The Login form stays open in the background, and other forms and queries can hook into the ID for the selected user name.

Hidden Form Closes Automatically

Everything works well, except when I open the data entry form in design view, to make changes. Then, without warning, the Login form closes. The user ID isn’t available to any of the other forms, and I have to go back to the Login, and select a name again.

This is more of an annoyance than a serious problem, but I wanted to figure out why it was happening.

I put breakpoints all through the code, and stepped through, to find out when the Login form closed. Was there something in the code that was making it shut down?  Nothing turned up in the code, so I was left scratching my head.

The SubForm Did It

Finally, it dawned on me that the Login form and the Data Entry form both used the same subform – it holds the logo, at the top left.

accesslogoform04 

The Logo subform saves space in the database, because the image is only in there once. It also makes it easy to make global changes, if the logo or heading text changes.

When I opened the data entry form in Design View, the Logo subform was also in Design View.

accesslogoform02

The hidden Login form closed because it couldn’t show the Logo in form view, while the Logo was in Design View on another form.

Fixing the Problem

To solve the problem, I created a copy of the Logo form, and named it Logo2. On the Login Form, I changed the subform to Logo2. Now, there is no conflict when I open the Data Entry form in Design View, so the hidden Login form stays open.

Maybe this will help you, if you have Access forms that mysteriously close, without being told to.

__________

Organizing Email in Outlook

A couple of weeks ago, due to some computer problems, I set up a new copy of Outlook 2010 on my laptop.

I’ve used Outlook for many years, starting with Outlook 98, I think. Usually I copy the old Outlook files to a new machine, or upgrade over an existing version, but this time I was starting fresh.

In the past, I’ve had one or more folders for each client, plus dozens of other folders for website related emails, personal correspondence, newsgroup follow-up, and anything else I could think of.

The Simple System

This time, I’m keeping it simple. In addition to the built in folders that Outlook has, I’ve only created 3 folders for my mail:

  1. _ Followup
  2. _Business
  3. _Personal

OutlookFolders01

The underscores keep my folders above the other Outlook folders, so they’re easy to find. So far, it’s working well. I don’t have to think about filing, or wonder which subfolder I stored an email in. To find something in the Business folder, I can sort by name, or date, or use the filter or search tools.

Your Outlook System

How about you? Is your Outlook folder system simple, or complex?

_______

Access Database is Read Only

When I tried to open one of my main Access databases today, I got the alarming message, “The database ‘MyData’ is read-only. You won’t be able to save changes made to data or object definitions in this database.”

readonly01

I closed it, and tried to open it again, making sure that I hadn’t accidentally selected the Read Only option.

More Troubleshooting Steps

A Google search turned up some dire warnings that this could be a sign of corruption, so I created a new database, imported all the tables, queries, forms, and everything else, and all seemed well.

So, I renamed the old version, and gave the new version the same name as the previous one, so my Windows Explorer shortcuts and connections would work.

Is It Locked?

As soon as I opened the new copy of the database, the “read-only”problem was back. So, I decided to look for “.ldb” files.

When an Access database is open, it automatically creates an ldb file. This file has the same name as the database, with an “.ldb” or “.laccdb” extension. Later, when the database closes, that ldb file is automatically deleted.

  • NOTE: Access uses an ldb file to keep track of which records in the database are currently locked, and by whom. (Records are locked while someone is editing the record.) Maybe you’ve seen a “Write Conflict” warning message when you try to save a record, because someone else is changing that record, or a record close to it.
  • You can read more about these Access locking files on the Microsoft website.

Sometimes those ldb files don’t get deleted, when a database closes, and that can cause problems.

So, I looked for errant ldb files, that were mistakenly telling the database someone else had it open. There was nothing.

Connection Problem

Finally, it dawned on me — connections could be the problem.

I had an Excel file open, and it queried the database, so maybe that was the problem. I closed the Excel , re-opened the database, and it worked fine.

Later, if I tried to open the database when the Excel file was open, the database was read only.

Fix the Connection

Well, I don’t have the two files (Excel and Access) open simultaneously too often, but I wanted to have that option available.

So, I checked the connection strings for the queries and found that they included this setting:

  • Mode=Share Deny Write

I changed the setting to this instead:

  • Mode=Read

and the files now live in harmony (so far).

Where Are the Connection Strings?

To find the connection strings in Excel:

  1. Click the Data tab on the Ribbon, and then click Connections.
  2. On the Workbook Connections dialog box, click a connection name in the list
  3. Click the Properties button, to open the Connection Properties dialog box.
  4. Click the Definition tab, and edit the Connection String.
    • The strings that I edited were for Provider=Microsoft.ACE.OLEDB.12.0
    • The Mode setting might not appear in other types of connections.

Why Share This?

This information is probably of no interest to you, unless you landed here in a Google search for this error message:

  • “You won’t be able to save changes made to data or object definitions in this database”.

But, one day in the future, I might run into this error again, and maybe I’ll find my own solution when I do a Google search.

Don’t laugh — it’s happened to me before! (more than once!)

___________

Problems Deleting an Outlook Folder

I’ve had some strange problems with Outlook for the past couple of weeks

  • complains about things not being closed properly
  • usually crashes the first time I try to print a message
  • crashed when I tried to select a couple of messages (it’s challenging to delete a message when you can’t click on it!)
  • very slow opening and closing

Probably the Outlook file was getting pretty big, so I deleted a bunch of messages, and compacted the Personal Folder. The Outlook.pst file was reduced to about half its previous size, but some of the problems persist.

How To Delete an Outlook Subfolder

Today I wanted to delete a subfolder that I don’t need, and even though the folder is empty, an Outlook showed a message said the folder was full, and couldn’t be deleted. Or maybe I didn’t have the correct permissions, and should check with the Administrator. Well, I’m the Administrator, and have permission to do whatever I want!

Google showed me how to get rid of that folder though.

  • Press the Ctrl key while opening Outlook, and confirm that you want to open in Safe mode.
  • Then, while you’re in Safe mode, select the folder and delete it.

If you’ve run into a similar problem, I hope this works for you too.

__________