PC Review


Reply
Thread Tools Rate Thread

Help a newbie: Populating dropdown lists on a form using data from anothr dropdown list

 
 
DAVID
Guest
Posts: n/a
 
      13th Jun 2005
Hi, hope someone here can help me. I've been asked to do an absence booking
system for work. It's an office of around 120 people split into 7 teams and
the manager of each team would be updating this system.

I'm having a few problems however. The first main one being I want the form
to record absences when opened to have a dropdown list of the Team Numbers
so the manager can select their team number.

Then I need for another dropdown menu underneath to show the member of staff
in that team selected above.

Once the member of staff is chosen I want that name to be copied into a a
name field on the new record to enter an absence for that person.

Then when they click the save button it clears everything but the team
number. Is this possible? And if so, can anyone help me implement it?

So the form would look something like this

Team Number:
Staff Member:
Team Member / Reason for Absence / Date

Save


 
Reply With Quote
 
 
 
 
Dan Artuso
Guest
Posts: n/a
 
      14th Jun 2005
Hi,
I'll try to get you going on this.
I'm going to have to make some assumptions about your tables, but if you do not have this structure,
you probably should.
tblEmp; a list of employees and the usual data including the TeamId
tblTeams: A list of Teams with TeamId (this can be your TeamNumber??) being the primary key

I'm going to assume here that an employee can only belong to one group at a time so the TeamId in tblEmp
will identify which group they belong to.

Your first combo will be populated by a query something like this:
Select TeamId From tblTeams

Okay, then your StaffMember combo will use this:
Select <relevant fields> From tblEmp Where TeamId = Me.cboTeamId

In the After Update event of your first combo you would have this line of code:
Me.cboStaffMember.Requery

See if you can ge that far.

--
HTH
Dan Artuso, Access MVP


"DAVID" <(E-Mail Removed)> wrote in message news:6tmre.1054$(E-Mail Removed)...
> Hi, hope someone here can help me. I've been asked to do an absence booking
> system for work. It's an office of around 120 people split into 7 teams and
> the manager of each team would be updating this system.
>
> I'm having a few problems however. The first main one being I want the form
> to record absences when opened to have a dropdown list of the Team Numbers
> so the manager can select their team number.
>
> Then I need for another dropdown menu underneath to show the member of staff
> in that team selected above.
>
> Once the member of staff is chosen I want that name to be copied into a a
> name field on the new record to enter an absence for that person.
>
> Then when they click the save button it clears everything but the team
> number. Is this possible? And if so, can anyone help me implement it?
>
> So the form would look something like this
>
> Team Number:
> Staff Member:
> Team Member / Reason for Absence / Date
>
> Save
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to back up Outlook tasks and copy them to anothr computer Pat Cyprus Microsoft Outlook Discussion 2 5th Jun 2009 11:37 AM
Combo box based on anothr combo box =?Utf-8?B?VGtub3dz?= Microsoft Access VBA Modules 2 20th Nov 2007 06:08 PM
ADE - file is locked for editing by anothr user... stuartb113 via AccessMonster.com Microsoft Access ADP SQL Server 8 8th May 2006 07:28 PM
Files used by anothr program Mike Windows XP Basics 1 25th Dec 2003 12:03 AM
Click on a subfrom and the current event of anothr subform fires Mark A. Sam Microsoft Access Forms 0 24th Jul 2003 10:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:49 AM.