Logo

MS Access FAQ - General

Logo

Table of Contents (16 Questions)

Bullet Compiling your Access application
Bullet Curl up with a good book
Bullet Printing the relationships Window
Bullet Resetting Counter Fields
Bullet Putting your Access database on the web
Bullet Out of memory
Bullet The Windows File/Open Common dialog
Bullet Custom Toolbar bitmaps
Bullet Opening a database on a read-only device
Bullet Database doesn't shrink after deleting something
Bullet Spell Checker
Bullet Books for getting into Access/VBA programming
Bullet Access on a Mac
Bullet Change Main window Title
Bullet Importing AutoNumbered Data
Bullet Access 95


Q How can I compile my Access application
Back to Top
A Access 2.0: There is no Access Compiler. You can distribute your app with the ADT (Access Developers Kit), this consists of a setup wizard and a royalty free runtime version of Access.

Access 97: I'm not about the availability of a developer toolkit for 97 but you can create MDE applications, this option is available from the tools menu in Access 97 and will create a smaller/faster version of your database that no user can modify the design of. It still isn't true compiled executable code but no-one will be able to get at your source code from one of these.

Updated: 21/12/1997 - Trevor Best


Back to Top
Q What's a good book on Access
Back to Top
A Access 2 Developers handbook by Getz, Litwin & Reddick - published by Sybex, ISBN 0-7821-1327-3

(I wish I could get commission on this:)

As Reccomended by Cyberkalt in the newsgroup:
Access 97 Developer's Handbook
Third Edition
Sybex
Paul Litwin / Ken Getz / Mike Gilbert
ISBN: 0-7821-1941-1

or

Access 97 Secrets
IDG Books Worldwide
Cary N. Prague / William C. Amo / James D. Foxall
ISBN: 0-7645-3043-7

Updated: 30/12/1997 - Trevor Best


Back to Top
Q How can I print the relationships Window? File/Print just prints it out in text mode.
Back to Top
A Access 2.0 If you have Paint Shop Pro or something similar, capture the screen and print it from there, if not use the PrintScreen button to capture the screen and paste it into paintbrush or write or another package that can print graphics.

Access 97 The Access 2.0 approach still works but MS have provided a Print Relationships Wizard on their site for free download (just search for free software at www.microsoft.com).

All Versions You can use the relationship printing tool from Software Wizardry, which will scale your relationships window to fit on a single page.

Updated: 12/01/1998 - Trevor Best


Back to Top
Q How do I reset counter fields. During testing I've used a lot of dummy values, but I want my counters to be reset when I deliver my application.
Back to Top
A After deleting your dummy data, compact the database, this will reset counter fields to the next sequential value, e.g. for a table with no records this will be zero but if the table still contains data then it will be 1 + the highest value in the table.

Updated: 21/07/1996 - Trevor Best


Back to Top
Q How can I allow access to my MS Access databases via HTML pages on the Internet World Wide Web?
Back to Top
A Access 2.0 If your web server is running on Windows NT or Windows 95 then there's a good chance that will support the Win-CGI standard, this means you can write CGI scripts using Visual Basic, which as you know can access an Access database. WebSite from O'Reily Associates, supports Win-CGI, and they have example cgi scripts for linking your pages to Access databases using Visual Basic.

Access 97 now has a Wizard to do this, using MS-IIS as the Web Server.

Other links for link web pages to Access databases
Cold Fusion

If you know of any others (with examples), mail me

This site is unix based and the only CGI we're allowed is the counter and the mail thing used in the feedback form, I keep this faq in an Access database and use an Access Basic procedure to output the HTML pages. There is a HTML printer driver you can use for reports but from what I've seen of it it's pretty useless IMHO.

Updated: 22/12/1997 - Trevor Best


Back to Top
Q Access tells me it's run out of memory, I have gobs of RAM on my PC, how can this be?
Back to Top
A Access 2.0: This is a throwback to DOS segemented memory architecture and as Access is a 16 bit application, it uses memory in 64K segments so no matter how much RAM is installed on your PC or how much Windows says is free, you can still get an "Out Of Memory" message when Access has filled up one of these 64K segments.

This can also happen if the DOS memory (below 640K) fills up as 16 bit programs need access to this as well.

I'm not sure if Access 7.0 (32 bit) has addressed this issue fully as I haven't used it in anger (I haven't used it since the beta testing period)

Access 97: I haven't had this problem thus far, as a 32 bit program One would assume that "Out of Memory" means "Out of Memory", buy more RAM.

Updated: 22/12/1997 - Trevor Best


Back to Top
Q How do I get the Windows File/Open common dialog to appear and return the selected filename
Back to Top
A Access 2.0: There is a demonstration of this in the Startup Database in the Downloads Section.

Access 97 The Solutions database that ships with 97 has an example of this although it seems locked in to it's own particular purpose (i.e. reattaching northwind tables), my own generic function is here.

Updated: 22/12/1997 - Trevor Best


Back to Top
Q How can I attach a custom bitmap to my toolbar buttons?
Back to Top
A You can't. Access 2.0 is limited to using the toolbar face bitmaps that are built into the Customize dialog.

Updated: 17/08/1996 - Mike Gunderloy


Back to Top
Q Can I run an Access database from a CD-ROM or other read-only device?
Back to Top
A Normally, the .LDB file must be in a directory where the user has read-write privileges. However, it is possible to open a database in a directory or device where a user has read-only privileges. To do this, select both the Read Only and the Exclusive check boxes in the Open Database dialog box. The Open Database dialog box can be found by selecting Open Database from the File menu. The combination of read-only and exclusive means that users
will not be updating any database information, so record-locking isn't required. Since record-locking isn't required, MS Access does not attempt to open or create an .LDB file.

Also (I haven't tested this but here's a theory) on a Novell network, you could have read-only rights to a directory but the supervisor could give you read-write access to the ldb file.

Updated: 17/08/1996 - Sunny Lam


Back to Top
Q I just deleted a lot of records and other objects from my database and it hasn't got any smaller, why?
Back to Top
A Access does not recover free space immediately, under some circumstances it will re-use the deleted space for new objects and records so the size of the database file will not grow for a long time.

However, if you want to regain the space then simply compact the database.

Updated: 08/11/1996 - Trevor Best


Back to Top
Q How can I spell check a field
Back to Top
A Picked up from comp.databases.ms-access: message posted by Gerard O'Connor :
--------------------------------------------
If you are after a "free" spell checker for MS Access 2.0, try

ftp://ftp.demon.co.uk/pub/ibmpc/win3/apps/spell/old_versions/spell240.zip

This version is free, and you can also download the dictionaries for it.

The newer version, in ftp://ftp.demon.co.uk/pub/ibmpc/win3/apps/spell is
no longer freeware.
-----------------------------------------------

Also KB article # Q96544

I haven't yet checked out the spell checker that ships on Office 97 as to whether it works on Access.

Updated: 22/12/1997 - Trevor Best


Back to Top
Q What are some good Access reference books for beginning VBA
programmers?
Back to Top
A 1) Building Access 2 Applications by John S. Dranchak and Joseph R. LaCroce. Published by Wiley, 1995. This doesn't teach coding, but it is a superb introduction to relational database theory for beginners and intermediates. I regard it as essential.
2) Beginning Access VBA Programming on Wrox Press. Terriffic book.
3) Microsoft Access for Windows '95 Power Toolkit by Michael Groh. Published by Ventana. This is my favorite right now.

More advanced books include the Developer's Handbook by Getz, et. al. and Power Programming by Barker (very advanced, but you'll be using it eventually - his code examples on the CD are priceless [or worth the price, at least).

Good Visual Basic 4 intros include Wallace Wang's so-called "Dummies" book (and "*More* Visual Basic 4 for Dummies," which is chock full of neat stuff) and Microsoft's own Learn Visual Basic Now, which has a working model of Visual Basic on CD.

Updated: 29/08/1996 - Robin Markowitz


Back to Top
Q Is there a version of Access for the Macintosh?
Back to Top
A No, and there are currently no plans to produce one either.

Updated: 29/08/1996 - Trevor Best


Back to Top
Q How can I change the Title of the MS-Access title bar?
Back to Top
A Access 2.0
The simple way, In the .ini file:

[run-time options]
TitleBar=My Text
StartupScreen=mypic.bmp
Icon=MyIcon.ico

Or dynamically in code:

Declare Sub WinApi16_SetWindowText Lib "User" Alias "SetWindowText" (ByVal hWnd As Integer, ByVal lpString As String)
Declare Function WinApi16_GetParent Lib "User" Alias "GetParent" (ByVal hWnd As Integer) As Integer


Sub SetTitle ( pstrText As String)
Dim hWndAccess As Integer
' open up a form that's small and light
DoCmd OpenForm "frmSmall"
' Make it invisible
Forms!frmSmall.Visible = False
DoEvents
' get it's window handle
hWndAccess = forms!frmSmall.hWnd
' trace back to main access window handle
Do Until WinApi16_GetParent(hWndAccess) = 0
hWndAccess = WinApi16_GetParent(hWndAccess)
Loop
DoCmd Close A_FORM, "zsfrmBackground"

WinApi16_SetWindowText hWndAccess, pstrText
End Sub

Access 97
Database properties?

Updated: 22/12/1997 - Trevor Best


Back to Top
Q I need to import a table from another database, this other table has an auto numbered field, I want to import it to a table in Access that also has an autonumbered (Counter) field and I want to preserve the values already in the other database and continue to use the AutoNumber feature.
Back to Top
A Create a duplicate of the target table in Access with a normal Long Integer field instead of the AutoNumber, import the data into this table table then use an append query to move the data into the real table, append and update queries preserve the original values when putting the data into AutoNumbered fields.

If the other database is ODBC complient then you can actually skip the temp table and import, just connect (link/attach) to the external table and run the append query straight from there.

If the table in the other database is likely to be maintained then consider just linking to that table instead of importing the data in order to cut down on maintenance, if you're worried about referential integrity not being maintaned by the Jet engine because the data resides in a different database then you can periodically import just the primary and foreign key fields from that table into another table in Access and relate the other tables to that, but always get upto date information from the data being maintained elswhere.

Updated: 16/11/1997 - Trevor Best


Back to Top
Q Why isn't there much about Access 95 here
Back to Top
A Because A:
I didn't get involved with Access 95, I wasn't impressed with it during the beta testing period. Therefore, I don't know much about the specifics of Access 95.

Because B:
IMHO Access 95 is irrelevant, Access 97 is the current version and I say upgrade to 97 now. Access 2.0 is still relevant as it's still widely used by people on lower spec PCs and by those who just haven't gotten out of the Windows 3.x hole.

Besides which, most of what is true for Access 97 would also count for Access 95 as well, e.g. API declarations are the same for both as both are 32 bit.

You'll have to bear with me as specific Access 97 things start creeping in as I've only just started using it properly in Dec 97 (still not as much as I use Access 2.0 though).

Updated: 22/12/1997 - Trevor Best


Back to Top