A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combo Boxes-Access 2007



 
 
Thread Tools Display Modes
  #1  
Old April 6th, 2010, 09:34 PM posted to microsoft.public.access.forms
Suew
external usenet poster
 
Posts: 48
Default Combo Boxes-Access 2007

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.

  #2  
Old April 6th, 2010, 10:01 PM posted to microsoft.public.access.forms
Golfinray
external usenet poster
 
Posts: 1,597
Default Combo Boxes-Access 2007

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.
--
Milton Purdy
ACCESS
State of Arkansas


"SueW" wrote:

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.

  #3  
Old April 6th, 2010, 10:03 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Combo Boxes-Access 2007

On Tue, 6 Apr 2010 13:34:02 -0700, SueW
wrote:

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.

--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.