Concensus book for intermediates and help-needed examples

  • Thread starter Thread starter George
  • Start date Start date
G

George

Hello,

Got that great double set of Developers Handbooks, but as
much as I know about Access I seem to be missing a lot
between basics and that offered in the Handbooks. (Some
examples below.) Is there a consensus on a good Access
book for learning the intermediate things involving a
complex database design (15 to 20 tables and various 1-1,
1-many, many-many relationships)?

Examples of the kind of thing I need to learn:
* On a form, fill city and state fields in Contact table
when a ZIP Code is selected from from ZIPCode table combo
box.

* Limit the number of records in a Configuration table to
one -- editing, but no adding or deleting.

* Have the title on a form be a variable which gets
filled from a field in the Configuration table.

* And sooooo many more things!!!

Thanks,
George
 
Hi George.

Will let others suggest the books, but the examples you ask about can all be
solved with DLookup():
Private Sub Zip_AfterUpdate()
If Not IsNull(Me.Zip) Then
Me.City = DLookup("City", "ZIPCode table", "Zip = """ & Me.Zip &
"""")
End If
End Sub

For basics on how DLookup() works, see:
http://allenbrowne.com/casu-07.html

For suggestions on how to set up a configuration table to retrieve value
from, see:
http://allenbrowne.com/ser-18.html

To create a table that can have only one record, use a Number type for the
primary key, and set this Validation Rule for the field (lower pane in table
design):
[ID] = 1
 
Back
Top