Really Bob, tables are only for storing data. Much better to use forms for
input because there is then the possibility of checking and restricting your
data. Can't be done with tables.
I suspect that your table structure is not optimal
You need a table of Streets
StreetID Autonumber Key
Street Text Indexed Duplicates Not allowed???? (Unless
there are duplicate street names) Required - Yes
Then you need a table of Areas
AreaID Autonumber Key
Area Text Indexed Duplicates
allowed???? (I suspect there may be the same intersections on parallel
roads) Required - Yes
StreetID Number Long Integer Indexed Duplicates allowed,
Required - Yes
Also in the indexes create an index of AreaStreet with AreaID and StreetID
and set it to Indexed Duplicates Not allowed. This will stop you creating
the sane area of a street twice
Set up a relationship between tables Streets and Areas and enforce
referential integrity between the StreetIDs
Then a form can be created based on the Area table and combo box to select
the appropriate street
You then want a third table, and here I am hazy on what is required
Table Projects
ProjectID Autonumber Key
Project Text e.g. Sewers
ProjectNo Text e.g. 2003-01
Then Either StreetID if it applies to the whole street OR AreaID if the
project applies to just 1 area of the street Number Long Indexed
Duplicates allowed
Your final form is based on the Project table and a combo box to pick either
the street or the area
This combo box would probably have to show both street and area, because the
same intersections could apply to more than 1 street, or a street is known
to have multiple areas
If you haven't used forms you will find out how pretty things can be, and
the wizards will help you
Phil
"RRT" <NO******************@miramichi.org> wrote in message
news:LO********************@ursa-nb00s0.nbnet.nb.ca...
Bob,
In a previous post you had suggested this for my database:
In the Current Event for your form, change the rowsource of the
listbox to a filtered one, and requery.
sub Form_current()
dim strSQL as string
strSQL = "SELECT Street, Area from [table 1] " & _
"Where street = '" & me.street & "'"
me.listbox.recordsource = strSQL
end sub
I should of mentioned I don't use forms, I enter information directly
into tables. So I guess I could use SQL on the rowsource. What would I need
to enter? Something like this?
SELECT Street, Area from [Streets By Intersections]
WHERE Street=' & street &'
Just guessing....
RRT