devxlogo

Tip Bank

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

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()

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

Making Use of Shortcut Keys

“Send a Message” (Windows Programming, by Jonathan Zuck,VBPJ December 1995), a great example of code usable ina text editor, mentions three ways to code the Clipboard functionsusing SendMessage, VB’s Clipboard

Hide the Record Selector in Data-Bound Grid

To stop the selection bar on a data-bound grid from moving when navigating through records in the boundRDC or the rows on the grid, use the API call LockWindowUpdate(gridname.hwnd) before

List Box Cumulative Search

By default, VB list boxes use any keyboard input to find the firstitem beginning with the pressed letter. Where the number of itemsin a list box is large (>100), this