devxlogo

August 7, 1997

Detect Null Or Zero-Length Fields In A Database

This syntax is much faster than using an If.Then.Else construct to detectnull or zero-length fields, and it will ensure that an error will not occur.For strings: Dim sVar As String.sVar

When to Use SendKeys

Use the SendKeys function to exploit the delete functionalityof many grid and spreadsheet controls that have a delete functionality.Use this functionality without writing code to delete each rowif your form

Center Forms Onscreen

I use this procedure to center my forms. With frmParent, the lastloaded form is centered against the parent form. Otherwise, it’scentered against the screen. I always center forms in the

For…Next Loop Speedup

Whenever you use For.Next loops, it is faster NOT to use the countername after Next (of the For.Next loop). In nested loops, it produces significantlyfaster code. Sub Form_Load ()Dim TStart!Dim

Logging User Activity with VB and Access

A while back, I wrote a simple orders application that allowedusers to query and update order information. The application workedfine, but lacked a user activity log. It was difficult for

Using Database Transactions

When you first start using the VB database functions, you might wonderwhy they call its engine JET–it seems to not fly. Using databasetransactions (search the online help for BeginTrans) might

Second Editable Code Window In VB

Look for a thin horizontal line at the top of the client area in theVB code window that comes up when you view code for a form or a module.If

Return Values Not Required!

You do not have to use the return value of any function! Thisnew behavior is in the manual (under CALL), but is a shocker,and a little dangerous: Private Sub Form_Load()