home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / access / diverses / msaccess / faq2.txt < prev    next >
Text File  |  1995-02-27  |  6KB  |  114 lines

  1. Following are the most frequently asked questions in Section 2 (Tables/DB Design) of the MSAccess forum. If you don't find the answer to your question here, please feel free to post it in Section 2 and address it to "All."
  2.  
  3. 1. Q. How should I design my database?
  4.  
  5.    A. The best place to start is with Chapter 2, "Designing a Database,"
  6.       in the Access 2.0 "User's Guide," and you may also want to take a 
  7.       look at article number Q100139 ("INF: Database Normalization 
  8.       Basics") in the Microsoft Knowledge Base forum (GO MSKB). In 
  9.       addition, reading some books on database design is highly 
  10.       recommended. (See "Recommended Books on Database Design" on page 
  11.       39 of the Access 2.0 "User's Guide.")
  12.  
  13. 2. Q. I've separated my application into two databases as the 
  14.       documentation recommends. When I distribute my application, how am 
  15.       I going to get Access to attach to the tables?   
  16.  
  17.    A. There are several examples of how to do this in the forum 
  18.       libraries, such as NWLOCL.ZIP in library 7 and REATTC.ZIP in 
  19.       library 2. (For more examples, you can do a keyword search on 
  20.       "attach" in the forum libraries.)
  21.  
  22.       There are also a couple of Access Basic functions available on 
  23.       pages 35-37 of the "Advanced Topics" manual that comes with the 
  24.       Access Developer's Toolkit (ADT). If you don't have the ADT, you 
  25.       can use the example in SOLUTION.MDB in your Sampapps subdirectory. 
  26.       Note: The code in SOLUTION.MDB depends upon the presence of the 
  27.       Access wizards, so this option should only be used in the full 
  28.       version of Access.
  29.  
  30. 3. Q. I deleted my table from the relationships window, but Access still 
  31.       thinks that the relationship exists. What's going on?
  32.  
  33.    A. If the table/relationship appears again when you choose Show All 
  34.       from the Relationships menu, then you have only removed the table, 
  35.       not the relationship. Deleting a table from the relationships 
  36.       window only removes that table from the *layout* of the window. To 
  37.       delete the relationship, you must select the join line with your 
  38.       mouse and press the delete key.
  39.  
  40. 4. Q. Access says that it can't delete my table because it is 
  41.       participating in a relationship, but I can't find the relationship 
  42.       in the relationships window. Help!
  43.  
  44.    A. Assuming that the relationship has been deleted correctly (see #2 
  45.       above), you may have a "phantom" relationship. Article number 
  46.       Q119481 in the Microsoft Knowledge Base forum (GO MSKB) describes 
  47.       the cause of this problem and provides an Access Basic function to 
  48.       delete the phantom relationships.
  49.  
  50. 5. Q. The right fill character (!) in my input mask doesn't really fill 
  51.       from right to left.
  52.  
  53.    A. This is a known problem with the right fill character, and it is 
  54.       discussed in article number Q114880 in the Microsoft Knowledge 
  55.       Base forum (GO MSKB). The article provides an example of how to 
  56.       set up a phone number field so it accepts either a 7-digit phone 
  57.       number or 10-digit phone number.
  58.  
  59. 6. Q. How can I get my counter field to start at a number other than 1?
  60.  
  61.    A. You can use the technique described in the on-line Help. (Choose 
  62.       Search from the Help menu, search on "Counter," and go to the 
  63.       topic titled "Changing the Starting Value of a Counter Field 
  64.       (Common Question).") This is also covered in article number Q94821 
  65.       in the Microsoft Knowledge Base forum (GO MSKB).
  66.  
  67. 7. Q. My counter field is missing some numbers. How can I renumber them?
  68.  
  69.    A. The counter field doesn't automatically reuse a number when you 
  70.       delete a record. You may also have some numbers out of sequence if 
  71.       you have started to add a record and then canceled it. You can 
  72.       resequence your counter field with the following steps, but keep 
  73.       these notes in mind: 
  74.      
  75.       -Counters should not be used as "record numbers." In fact, a 
  76.       record number doesn't have much meaning to a Relational Database 
  77.       Management System (RDBMS) like Access. Unique primary key 
  78.       values distinguish one record from another, and the best 
  79.       primary keys are made up of naturally-occurring unique values, 
  80.       such as a Social Security Number or an Employee ID, rather than a 
  81.       counter or a "record number."
  82.  
  83.       -Don't resequence these numbers if this is the primary key of a 
  84.       parent table that has related child records unless you have
  85.       selected Cascade Updates in the relationship.
  86.  
  87.       Method 1
  88.       1. Delete any relationships involving this counter field.
  89.       2. Make a backup copy of your table.
  90.       3. Open the table in design view.
  91.       4. Remove the primary key index (if the counter field is part of 
  92.          the primary key).
  93.       5. Delete the counter field.
  94.       6. Add a new counter field.
  95.       7. Reset your primary key if applicable.
  96.       8. Recreate relationships as necessary.
  97.  
  98.       If you are using the steps above on a large table in Access 1.x, 
  99.       you may run into memory errors. (This is due to the 4M transaction 
  100.       limit in 1.x. In 2.0, you are limited by the amount of available 
  101.       memory.) If this is the case, use Method 2 below.
  102.  
  103.       Method 2
  104.       1. Delete any relationships involving this table.
  105.       2. Make a copy of your table's structure. (Highlight the table in 
  106.          the database window, select Copy from the Edit menu, select 
  107.          Paste from the Edit menu, type in a new table name, and choose 
  108.          Structure Only.)
  109.       3. Create and run an append query that appends the records from 
  110.          your old table to the new one. (Include all of the fields in 
  111.          the query grid *except* the counter field.
  112.       4. Recreate relationships as necessary.
  113.  
  114.