The Linux Page

Help other users realize that everything is possible, especially avoiding Windows for their own personal use.

Welcome to The Linux Page


Fox Trot by Bill Amend. Click to enlarge.
Click to enlarge

This site is a collection of my own work with Linux. Certain things are easy, others take time to decipher and if I ever need to repeat the work (which usually happens!), then I need to remember everything by memory or... have a site with all the steps taken and to take again.

The following are my most recent posts:

Today I was creating a report and created a table with a column named 'Group'. It looked like it worked just fine so I moved on with it.

Then, at the point I wanted to insert data with a simple INSERT INTO ... statement, it broke. The statement would generate a syntax error. Yes. The simple answer is that GROUP is viewed as a keyword and thus when used as a field name it needs to be escaped (i.e. written between backward quotes: `...`). Not liking the need to escape a field name each time I use it, I just renamed the field which is even better.

In order to take a screenshot on your Mac OS/X system, simply type "Apple-Shift-3". Then you will see an image on your Desktop. As far as I know you cannot control where the image will go.

There are many other combinaisons that let you select the part of the screen you want a screenshot of.

The name of the file on your dekstop is "Picture #.png" where # increases as required. Although since 10.4 you can change the file format with a Unix command.

In MS-Access you can create a Recordset using the OpenRecordset on a database.

Once you have that record set, you can get the rows with the GetRows() function.

It has one advantage: once the function returns the data remains consistent (it is in an array). The really bad part is... what is returned is an array. This means all the fields are now numbered instead of named.

When you want to modify a set of rows in a table but need to do some computation as you go, you probably want to use a cursor. That's my first idea. Whenever possible I do an UPDATE, but in one case that was just way too heavy (i.e. one SELECT plus one UPDATE per row!) Of course, in the end, the result is the same, but it is much less tedious to use a cursor.

How to use a cursor is very well explained in the documentation once you know the functions that you need to use to make it work. I only knew that the Recordset could be used that way.

When using the QODBC driver, it is possible to define all the Address fields. You have 5 x Addr, 5 x BlockAddr, City, Postal Code, Country, and Notes. This means quite many fields (15 to be precise.)

Trying to use the BlockAddr does not work.

The other fields work, but the result is that everything ends up in a blob of data. More or less, when you read it back, you'll have no clue what's what... That is one problem.

Now, the other problem is the following error:

I have been looking for a way to hide some columns in a datasheet form.

The main reason to hide columns is to include data that you need whenever the user clicks somewhere, but that data is too technical to be shown. For instance, if you work with QODBC you have the ListID and TxnID to keep around but both look like GUID and thus are much better hidden from an every day user view.

The reason why I'm bringing this up is simple: whenever you have a field in a form that you want to hide, you click on it, go to the Format properties of that control and select Visible: No, I use that to ...

Often, when you use LEFT JOIN, you will have one table and one comparison.

Whenever you need more than one comparison, they must be put between parenthesis, otherwise you get that silly error saying: LEFT JOIN are not supported.

So you need to write something like this:

SELECT *

FROM table

LEFT JOIN other

ON (table.f1 = other.f1 AND table.f2 = other.f2)

WHERE table.f3 = 'something'

As I was writing a report using VBA in MS-Access, I needed to get a name from a table. Yet, once in a while, that name does not exist in that table (for good reasons) and yet I'd like a more human name than the default number that you otherwise get... The result was a need for two LEFT JOIN in my SQL command.

  1. Using the result

I have three text boxes in my form:

(a) The one that the user sees with the valid result, it actually includes a simple VBA script:

In MS-Access, you can select a special value for your combo boxes called:

"Find a record on my form based on the value I selected in my combo box"

In older versions of MS-Access, all you had to do is select the option and be done with it. However, the option would have no effect if the form was not properly assigned a source query.

In order to paliate to that problem, Microsoft decided to check the current form status and, if unlinked, hide the option altogether so you cannot make a mistake.

The problem is that for many people the train of thought was not automatically that way.

Have you seen animated icons in your tabs? This has been working for a while, with IE and FF and Co.

All you have to do is create an animated GIF file as your "favicon.ico", and it is better to name it .gif, by the way.

Because icons can now be pretty much any image format, not just .ico

And if you need some favicon for your site, check this one out: http://www.favicon.cc

Many of these are free!

Thank you for visiting my website.