Syndicate content

Visual Basic

MS-Access variable types that do not exist?!

Problem

I worked on a project with many functions that access the database. These functions will generally have a Recordset variable. Yet, when I tried to run a script with the recordset declaration, it would fail with the error Undefined variable type.

  Dim rcd As Recordset

Since that definition was not required for the software to work, I ignored the error for a long time.

Closing a window from Flash

I had a little project which requirements was an Adobe Flash animation that calls a JavaScript function to close a browser window.

With the newest version of Internet Explorer, it will first ask you whether you want to let the script close your window... that's a problem when you'd like that process to be smooth (i.e. without user interaction.)

MS-Access and variables set to Nothing

In VB and MS-Access, whenever a variable referencing an object is set to Nothing, you cannot access any field since the variable does not actually point to a physical object.

This, code like this breaks:

	Dim r Is Object 
	r = Nothing 
	...
	r.Field = 5  ' Breaks if r is still Nothing

Thus, you need to test whether the variable r is defined.

MS Access classes

As most people know, all of the MS-Office macros are written in Visual Basic.

Visual Basic is for sure a huge whole lot better than the BASIC I had on my Apple //c. For one thing, it does not require line numbers and you can declare functions, procedures, and have local variables (FOR loops that use the variable I do not overwrite the variable I of the FOR loop from the calling function!)

Since MS-Access 2007, we have the possibility to create classes!

RETURN not working in Visual Basic & Arrays...

RETURN statement in BASIC

Like many programmers, I switch between languages quite often.

I have worked with BASIC before since I had an Apple //c and used other Apple ][ computers that had some (really bad, early) BASIC language in their ROM.

At the time, the worst part was the line numbers. You had to write in BASIC as if you were writing assembly language. And I'll skip the numerous problems with memory...

Syndicate content Syndicate content

Diverse Realty

Diverse Realty Team

Want a New Home?
Want to Sell Your House?

Call Alex at
+1 (916)
220 6482

Alexis Wilke, Realtor
Salesperson
Lic. # 02024063

Cory Marcus, Broker
Lic. # 01079165

     

Terms of Site Index

Find the page/content you are looking for with our index.

  • HTTPS

    Hyper Text Transfer Protocol Secure—The protocol used by browsers to communicate to web servers securely. The security is done with similarly to SSH. The transfer uses FTP like commands, but only one connection. Since HTTP 1.1 it is also possible to reuse the same connection for multiple files (pages, images, videos, etc.)

  • Jackalope
  • SP4
  • Warty
  • header