From: SueW on 6 Apr 2010 16:34 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.
From: golfinray on 6 Apr 2010 17:01 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. >
From: John W. Vinson on 6 Apr 2010 17:03 On Tue, 6 Apr 2010 13:34:02 -0700, SueW <SueW(a)discussions.microsoft.com> 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]
|
Pages: 1 Prev: Due Date Calculated Next: i need to add number in existing field when a form open |