J
Jean-Francois Gauthier
Hi there,
I have been working for hours trying to get this to happen. Here is some
information on my problem.
I have two tables, one called "exceptions" and another called "mail". I am
creating this mini database to take care of exceptions in terms of pay stub
distributions. All pay stubs are bundled by a back end system in groups
called Pay Lists. However on some occasions, there are stubs that need to
be transferred from one pay list to another, or in some cases, need to be
taken out from a paylist bundle and mailed manually to the employee. I am
creating this database to log and keep track of the exceptions.
What I also have is two forms, frm_exceptionsadd and frm_mailadd.
frm_exceptionsadd is used to do the data entry for all exceptions needing to
be logged. frm_mailadd is a popup form that is used when the stub from the
employee needs to be manually mail (home adress for exemple).
So on frm_exceptionsadd the dataentry clerk will need to enter information
in the following fields, [PRI], [FIRSTNAME], [LASTNAME], [PAY1], [PAY2].
PAY1 is the original paylist that the stub will be found in, and PAY2 is the
paylist that it should be transferred to. Now this is where I am having
trouble doing what I want to do. I want that [pay2] afterupdate and is
"Mail", then frm_mailadd pops-up. This is working fine. However, what I
want to happen, is that the information in form frm_exceptionsadd [PRI],
[FIRSTNAME] AND [LASTNAME] is moved to table "Mail" fields [PRI],
[FIRSTNAME], [LASTNAME] ONLY when "Mail" is inputted in [PAY2] of exceptions
form. I've tried the beforeupdate of these fields on form frm_mailadd, but
that has not worked. So I'm thinking that some VBA coding in the background
of frm_exceptionsadd could work. However I am not sure how to code this.
I'm thinking something like this:
Sub PAY2.afterupdate()
If [PAY2] = "Mail" then
update value of [PRI], [FIRSTNAME], [LASTNAME] in table exceptions to table
mail
docmd.openform "frm_mailadd"
Else
End If
Basically the values need to be transferred from one table to another or
transferred from frm_exceptionsadd to frm_mailadd. This is to save some
input time for the dataentry team and is considered important.
I'm also thinking I can drop the fields [firstname] and [lastname] in table
mail and frm_mailadd as these field are already in table exceptions and a
query can give me this info on future reports if I match the two PRI.
However the PRI is the key for both tables and needs to transfer either to
the mail table or to frm_mailadd.
Is this doable?
Thank you.
I have been working for hours trying to get this to happen. Here is some
information on my problem.
I have two tables, one called "exceptions" and another called "mail". I am
creating this mini database to take care of exceptions in terms of pay stub
distributions. All pay stubs are bundled by a back end system in groups
called Pay Lists. However on some occasions, there are stubs that need to
be transferred from one pay list to another, or in some cases, need to be
taken out from a paylist bundle and mailed manually to the employee. I am
creating this database to log and keep track of the exceptions.
What I also have is two forms, frm_exceptionsadd and frm_mailadd.
frm_exceptionsadd is used to do the data entry for all exceptions needing to
be logged. frm_mailadd is a popup form that is used when the stub from the
employee needs to be manually mail (home adress for exemple).
So on frm_exceptionsadd the dataentry clerk will need to enter information
in the following fields, [PRI], [FIRSTNAME], [LASTNAME], [PAY1], [PAY2].
PAY1 is the original paylist that the stub will be found in, and PAY2 is the
paylist that it should be transferred to. Now this is where I am having
trouble doing what I want to do. I want that [pay2] afterupdate and is
"Mail", then frm_mailadd pops-up. This is working fine. However, what I
want to happen, is that the information in form frm_exceptionsadd [PRI],
[FIRSTNAME] AND [LASTNAME] is moved to table "Mail" fields [PRI],
[FIRSTNAME], [LASTNAME] ONLY when "Mail" is inputted in [PAY2] of exceptions
form. I've tried the beforeupdate of these fields on form frm_mailadd, but
that has not worked. So I'm thinking that some VBA coding in the background
of frm_exceptionsadd could work. However I am not sure how to code this.
I'm thinking something like this:
Sub PAY2.afterupdate()
If [PAY2] = "Mail" then
update value of [PRI], [FIRSTNAME], [LASTNAME] in table exceptions to table
docmd.openform "frm_mailadd"
Else
End If
Basically the values need to be transferred from one table to another or
transferred from frm_exceptionsadd to frm_mailadd. This is to save some
input time for the dataentry team and is considered important.
I'm also thinking I can drop the fields [firstname] and [lastname] in table
mail and frm_mailadd as these field are already in table exceptions and a
query can give me this info on future reports if I match the two PRI.
However the PRI is the key for both tables and needs to transfer either to
the mail table or to frm_mailadd.
Is this doable?
Thank you.