Combo Boxes-Access 2007

  • Thread starter Thread starter SueW
  • Start date Start date
S

SueW

Two tables as follows:

tblSenior Intake
tblSenior Intake ID-PK
tblFname
tblMiddleName
tblLastName
tblAddress
tblCity
tblTownship
tblState
tblPostalCode
TblHomePhone
etc.

tblSchedule
tblSchedule ID-PK
tblDriver
tblDay
tblAppointmentTime
tblCancelled
tblWhoCancelled
tblFname
tblLastName
tblAddress
tblCity
tblHomePhone
tblAppointmentTime
tblAppointmentNotes
tblDestination
tblReturnTime
tblReasonforTransportation

Want to create a combo box so that end user selects name and the
Fname,LastName,Address,City, and HomePhone fields automatically complete in
the form.
 
Name is not one of your field names and it should not be. Name is a reserved
word in Access. So are you talking about TblFname? It would usually be better
to search on the pk but you can probably search on Fname.
Create the combo. Allow the wizard to selct fname as your source. Then go
into the afterupdate property of the combo and start the code builder. Type:
Me.filter = "[tblfname' = """ & Me.combo# & """"
Me.filteron = true
The combo# will be listed and will be something like combo12 or combo110.
 
Two tables as follows:

tblSenior Intake
tblSenior Intake ID-PK
tblFname
tblMiddleName
tblLastName
tblAddress
tblCity
tblTownship
tblState
tblPostalCode
TblHomePhone
etc.

tblSchedule
tblSchedule ID-PK
tblDriver
tblDay
tblAppointmentTime
tblCancelled
tblWhoCancelled
tblFname
tblLastName
tblAddress
tblCity
tblHomePhone
tblAppointmentTime
tblAppointmentNotes
tblDestination
tblReturnTime
tblReasonforTransportation

Sorry, but your table design is WRONG.

Relational databases use the "Grandmother's Pantry Principle" - "a place - ONE
place! - for everything, everything in its place".

You should NOT repeat fields (HomePhone, LastName, Address, etc.) redundantly
in the schedule table. That information should exist only in the "intake"
table; the only field from that table which should be included in the
transportation table is the ID, as a foreign key link.

You could use a Form based on Intake with a subform based on Transportation in
order to see the information from both tables in conjunction.
 
Back
Top