On 06/28/2023 6:58 PM EDT Jim Wagner <josephwagner2@outlook.com> wrote:Mark,
Though this is not a big issue. I have dealt with this for 17 years, so if it cannot be done, i will live. I just was looking at any way of being more efficient. We are finally after 17 years moving to SQL after me pleading and begging and teaching that how we do things is not industry standard. We are still using Access as the front end because it would take another 17 years to redo every database in another UI.
qry_UpdateSICKAccrual
UPDATE [qry_R&D-ACCRUALS] INNER JOIN qry_AccrualsForReport ON [qry_R&D-ACCRUALS].Emplid = qry_AccrualsForReport.Emplid SET qry_AccrualsForReport.sick = [Balance], qry_AccrualsForReport.YTDsick = [Hrs Taken Ytd]
WHERE ((([qry_R&D-ACCRUALS].[Plan Type Descr])="Sick"));
qry_UpdateVACAccrual
UPDATE [qry_R&D-ACCRUALS] INNER JOIN qry_AccrualsForReport ON ([qry_R&D-ACCRUALS].Emplid = qry_AccrualsForReport.Emplid) AND ([qry_R&D-ACCRUALS].[Accrual Proc Dt] = qry_AccrualsForReport.[Accrual Proc Dt]) SET qry_AccrualsForReport.vac = [Balance], qry_AccrualsForReport.YTDvac = [Hrs Taken Ytd]
WHERE ((([qry_R&D-ACCRUALS].[Plan Type Descr])="Vacation"));
qry_UpdateCOMPAccural
UPDATE [qry_R&D-ACCRUALS] INNER JOIN qry_AccrualsForReport ON ([qry_R&D-ACCRUALS].Emplid = qry_AccrualsForReport.Emplid) AND ([qry_R&D-ACCRUALS].[Accrual Proc Dt] = qry_AccrualsForReport.[Accrual Proc Dt]) SET qry_AccrualsForReport.vac = [Balance], qry_AccrualsForReport.YTDvac = [Hrs Taken Ytd]
WHERE ((([qry_R&D-ACCRUALS].[Plan Type Descr])="Vacation"));
![]()
Rabu, 28 Juni 2023
Re: [MSAccessProfessionals] Combine several update queries into one query
Re: [MSAccessProfessionals] Combine several update queries into one query
Though this is not a big issue. I have dealt with this for 17 years, so if it cannot be done, i will live. I just was looking at any way of being more efficient. We are finally after 17 years moving to SQL after me pleading and begging and teaching that how we do things is not industry standard. We are still using Access as the front end because it would take another 17 years to redo every database in another UI.
qry_UpdateSICKAccrual
UPDATE [qry_R&D-ACCRUALS] INNER JOIN qry_AccrualsForReport ON [qry_R&D-ACCRUALS].Emplid = qry_AccrualsForReport.Emplid SET qry_AccrualsForReport.sick = [Balance], qry_AccrualsForReport.YTDsick = [Hrs Taken Ytd]
WHERE ((([qry_R&D-ACCRUALS].[Plan Type Descr])="Sick"));
qry_UpdateVACAccrual
UPDATE [qry_R&D-ACCRUALS] INNER JOIN qry_AccrualsForReport ON ([qry_R&D-ACCRUALS].Emplid = qry_AccrualsForReport.Emplid) AND ([qry_R&D-ACCRUALS].[Accrual Proc Dt] = qry_AccrualsForReport.[Accrual Proc Dt]) SET qry_AccrualsForReport.vac = [Balance], qry_AccrualsForReport.YTDvac = [Hrs Taken Ytd]
WHERE ((([qry_R&D-ACCRUALS].[Plan Type Descr])="Vacation"));
qry_UpdateCOMPAccural
UPDATE [qry_R&D-ACCRUALS] INNER JOIN qry_AccrualsForReport ON ([qry_R&D-ACCRUALS].Emplid = qry_AccrualsForReport.Emplid) AND ([qry_R&D-ACCRUALS].[Accrual Proc Dt] = qry_AccrualsForReport.[Accrual Proc Dt]) SET qry_AccrualsForReport.vac = [Balance], qry_AccrualsForReport.YTDvac = [Hrs Taken Ytd]
WHERE ((([qry_R&D-ACCRUALS].[Plan Type Descr])="Vacation"));
Re: [MSAccessProfessionals] Combine several update queries into one query
2) If you can give us a representative look at the data in the tables, that would help us greatly to determine if the queries can be engineered more succinctly/efficiently.
On 06/28/2023 3:54 PM EDT Jim Wagner <josephwagner2@outlook.com> wrote:Hello all,
I am looking at a very old process that creates a table daily. My retired boss created it a very long time ago, so I wanted to know if there is a way of making the process more efficient. I am breaking down the multiple queries in sections to see if i can recreate the process in less queries.
There are 3 update queries that update a table with values based on some criteria. there are 2 sources that are joined together to be the source. Below is the
The 3 queries update columns such as sick, vacation and comp with the balance for each. below are the query summary
sick column and Hrs taken Ytd for the YTDsick column based on the criteria of "Sick" for the Plan Type Descr field.
vac column and Hrs taken Ytd for the YTDsick column based on the criteria of "Vacation" for the Plan Type Descr field.
comp column and Hrs taken Ytd for the YTDsick column based on the criteria of "Comp time" for the Plan Type Descr field and "5W" for the Plan Type field.
Is there a way of getting this to be one query or I am I where I am at for good?
Thank You
Jim Wagner
[MSAccessProfessionals] Combine several update queries into one query
I am looking at a very old process that creates a table daily. My retired boss created it a very long time ago, so I wanted to know if there is a way of making the process more efficient. I am breaking down the multiple queries in sections to see if i can recreate the process in less queries.
There are 3 update queries that update a table with values based on some criteria. there are 2 sources that are joined together to be the source. Below is the
The 3 queries update columns such as sick, vacation and comp with the balance for each. below are the query summary
sick column and Hrs taken Ytd for the YTDsick column based on the criteria of "Sick" for the Plan Type Descr field.
vac column and Hrs taken Ytd for the YTDsick column based on the criteria of "Vacation" for the Plan Type Descr field.
comp column and Hrs taken Ytd for the YTDsick column based on the criteria of "Comp time" for the Plan Type Descr field and "5W" for the Plan Type field.
Is there a way of getting this to be one query or I am I where I am at for good?
Thank You
Jim Wagner
Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#116397) | Reply To Group | Reply To Sender | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [sugeng.panjalu.access@blogger.com]
Sabtu, 24 Juni 2023
Re: [MSAccessProfessionals] DLookup not working
Dear Sir,
Please find the attached my simple Access Database "TestData" where contained 2 Tables "Tbl_COTag" and "Tbl_HBColor" , actually "Tbl_HBColor" Table carried 2 fields "ColourName" and "FrenchTranslation" . And Table "Tbl_COTag" where field "COLOR OUT1:" stored value should be LOOKUP value from source Table "Tbl_HBColor" in field "ColurName" and "FrenchTranslation" to table "Tbl_COTag" in field "Lookup_HB_ENG_C" and "Lookup_HB_ENG_F"
Actually I need same as excel VLOOKUP function working process in Access Database using DLOOKUP function, for example I've attached both Access "TestData" and Excel "VLOOKUP_Excel" file for your better understanding.
If you give me clear Query example using DLOOKUP function in my attached "TestData" Access Database then it will best for me.
Thanks
Porag
Re: [MSAccessProfessionals] DLookup not working
Please find the attached my simple Access Database "TestData" where contained 2 Tables "Tbl_COTag" and "Tbl_HBColor" , actually "Tbl_HBColor" Table carried 2 fields "ColourName" and "FrenchTranslation" . And Table "Tbl_COTag" where field "COLOR OUT1:" stored value should be LOOKUP value from source Table "Tbl_HBColor" in field "ColurName" and "FrenchTranslation" to table "Tbl_COTag" in field "Lookup_HB_ENG_C" and "Lookup_HB_ENG_F"
Actually I need same as excel VLOOKUP function working process in Access Database using DLOOKUP function, for example I've attached both Access "TestData" and Excel "VLOOKUP_Excel" file for your better understanding.
If you give me clear Query example using DLOOKUP function in my attached "TestData" Access Database then it will best for me.
Thanks
Porag
Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#116395) | Reply To Group | Reply To Sender | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [sugeng.panjalu.access@blogger.com]
Jumat, 23 Juni 2023
Re: [MSAccessProfessionals] Filter report before emailing it
I have to do this as well. A solution that I found that works is to use a table to store the ID of the supervisor. Then create the report and query to filter off of that value in the table. Then as you loop, you can update that value with the current supervisor and export the report.
Mike D
Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#116394) | Reply To Group | Reply To Sender | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [sugeng.panjalu.access@blogger.com]