Microsoft Access
HELP

Sources for Quick Answers

Microsoft Access
Microsoft Access site

Google
Advanced

Questions from Users

Topic

Question & Answer

Data >How can I add a record simultaneously and automatically to two tables in a One to One Relationship?  I have enforced referential integrity, so it can cascade update and cascade delete automatically, but not add.

Relationships between tables only apply to existing records.  There is not "cascade add" for records.  You will have to put in some code.  Here is an example of how it can work.

Data >My Zip Codes have only 3 or 4 digits to them, especially in Connecticut and Massachusetts

During the data conversion, the Zip Code field was probably set to Numeric instead of Text
Here is how you can convert numeric to text and fix the zip codes

Locking > Only one person can get in to the file, and not two or more at the same time.

Here are the settings:
Default open mode: Shared
Default record locking: Edited record
Not Open databases using record-level locking

Data

Question: How can I see a directory of tables with their record count?

select [Name], DCount("*","["&[Name]&"]") as RecCount
from MSysObjects
where Type=1 and [Name] not like "Msys*"
order by 1
Data Question:  How can I find how many fields there are in a table?   It is too much trouble to count one by one.  There must be a faster way.

Go to Tools, Macro, Visual Basic Editor or Alt+F11
Select View, Immediate Window or Ctr+G
CurrentDB.TableDefs("tablefoo").Fields.Count


 

C I Corporation
202-829-4444
800-319-3190

Return

.