| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hi, I've got a table where the users enter information directly into the table (not using a form). This is a simple payroll data entry table. The employee ID field is a combo box that runs an SQL string on the employee table to get the seed values. What I'm trying to do is figure out a way to fill in other fields in the table based on what the user selects in the employee ID field. I want Access to retrieve the default work code and worker's comp code for the employee selected from the employee masterfile. Is this possible? Thanks, Kflash |
|
#2
| |||
| |||
| "kflash" <kflash@discussions.microsoft.com> wrote in message news:C8CC208C-0D80-4ED6-96FA-B26E38083955@microsoft.com... > Hi, > > I've got a table where the users enter information directly into the table > (not using a form). This is a simple payroll data entry table. The > employee ID field is a combo box that runs an SQL string on the employee > table to get the seed values. > > What I'm trying to do is figure out a way to fill in other fields in the > table based on what the user selects in the employee ID field. I want > Access to retrieve the default work code and worker's comp code for the > employee selected from the employee masterfile. Is this possible? Not if they're entering directly into the table. You need to use a form for this. With a form, you can run code when an employee is selected, to get the default codes and put them into the appropriate fields. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
|
#3
| |||
| |||
| Also, it is a very, very, very, very bad thing to have a person enter data directly into a table. If your database is very well designed there will be representational values in the table that mean nothing to the user - for example if you're working with a database for a hotel reservation system with multiple hotels, there'd be a second table in which the property names and property Id exists. In the table the user is editing, they'd have to know and enter the correct property ID. They won't know that 06 is one hotel, 11 is another, 23 yet another. "Dirk Goldgar" wrote: > "kflash" <kflash@discussions.microsoft.com> wrote in message > news:C8CC208C-0D80-4ED6-96FA-B26E38083955@microsoft.com... > > Hi, > > > > I've got a table where the users enter information directly into the table > > (not using a form). This is a simple payroll data entry table. The > > employee ID field is a combo box that runs an SQL string on the employee > > table to get the seed values. > > > > What I'm trying to do is figure out a way to fill in other fields in the > > table based on what the user selects in the employee ID field. I want > > Access to retrieve the default work code and worker's comp code for the > > employee selected from the employee masterfile. Is this possible? > > > Not if they're entering directly into the table. You need to use a form for > this. With a form, you can run code when an employee is selected, to get > the default codes and put them into the appropriate fields. > > -- > Dirk Goldgar, MS Access MVP > www.datagnostics.com > > (please reply to the newsgroup) > > |
|
#4
| |||
| |||
| Point taken on both counts. However, I'm not the designer here, I was just brought in for relief and this is what the client is asking for....I'm just the facilitator. Thanks for the comments. "dch3" wrote: > Also, it is a very, very, very, very bad thing to have a person enter data > directly into a table. If your database is very well designed there will be > representational values in the table that mean nothing to the user - for > example if you're working with a database for a hotel reservation system with > multiple hotels, there'd be a second table in which the property names and > property Id exists. In the table the user is editing, they'd have to know and > enter the correct property ID. They won't know that 06 is one hotel, 11 is > another, 23 yet another. > > "Dirk Goldgar" wrote: > > > "kflash" <kflash@discussions.microsoft.com> wrote in message > > news:C8CC208C-0D80-4ED6-96FA-B26E38083955@microsoft.com... > > > Hi, > > > > > > I've got a table where the users enter information directly into the table > > > (not using a form). This is a simple payroll data entry table. The > > > employee ID field is a combo box that runs an SQL string on the employee > > > table to get the seed values. > > > > > > What I'm trying to do is figure out a way to fill in other fields in the > > > table based on what the user selects in the employee ID field. I want > > > Access to retrieve the default work code and worker's comp code for the > > > employee selected from the employee masterfile. Is this possible? > > > > > > Not if they're entering directly into the table. You need to use a form for > > this. With a form, you can run code when an employee is selected, to get > > the default codes and put them into the appropriate fields. > > > > -- > > Dirk Goldgar, MS Access MVP > > www.datagnostics.com > > > > (please reply to the newsgroup) > > > > |
|
#5
| |||
| |||
| On Fri, 5 Sep 2008 08:37:16 -0700, kflash <kflash@discussions.microsoft.com> wrote: >Hi, > >I've got a table where the users enter information directly into the table >(not using a form). This is a simple payroll data entry table. The >employee ID field is a combo box that runs an SQL string on the employee >table to get the seed values. > >What I'm trying to do is figure out a way to fill in other fields in the >table based on what the user selects in the employee ID field. I want >Access to retrieve the default work code and worker's comp code for the >employee selected from the employee masterfile. Is this possible? Not in table view, no. You'll need a Form. Form Controls have an afterupdate event that would let you "push" these values; table combos don't. -- John W. Vinson [MVP] |
|
#6
| |||
| |||
| ....and of course you can always design a form so that it looks like you're editing directly into the table - even though the user isn't. "John W. Vinson" wrote: > On Fri, 5 Sep 2008 08:37:16 -0700, kflash <kflash@discussions.microsoft.com> > wrote: > > >Hi, > > > >I've got a table where the users enter information directly into the table > >(not using a form). This is a simple payroll data entry table. The > >employee ID field is a combo box that runs an SQL string on the employee > >table to get the seed values. > > > >What I'm trying to do is figure out a way to fill in other fields in the > >table based on what the user selects in the employee ID field. I want > >Access to retrieve the default work code and worker's comp code for the > >employee selected from the employee masterfile. Is this possible? > > Not in table view, no. You'll need a Form. Form Controls have an afterupdate > event that would let you "push" these values; table combos don't. > -- > > John W. Vinson [MVP] > |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.