list boxes and joined tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I've got a form with two list boxes on which relate to to different tables
(named tblLocations and tblStations, the list boxes are named similarly but
with lst in front instead of tbl). what i want to be able to do is select a
value in the lstLocations list box, open a data entry form for the Stations
table and have access associate the data for a statin with the selected
location and no other location. I then want the Stations list box to only
show me the stations related to the location in selection in tne locations
list box.

I have joined the two tables with a one to many relationship, there can be
many stations in one location, but every time I try to save a new station to
the station table I get a message saying
'You cannot change or add a record because a related
record is needed in tblLocations'

I do know this, this is why i've linked the two tables. I'm guessing that
Access thinks I want to add data to tblLocations but all I want to do is take
data that's already there and relate it to the station I'm adding to the
stations table. It's very frustrating, can anybody out there help please?

Diane
 
Are you attempting to add the record in the table or a form?

You should have a main form for location and subform linked on location to
enter the new station.
 
Back
Top