Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a data macro with the After Insert event for the Appointment table to add the Appointment.ActualCharge field to the Pet.AcctBalance field when inserting a

Create a data macro with the After Insert event for the Appointment table to add the Appointment.ActualCharge field to the Pet.AcctBalance field when inserting a row in the Appointment table.

To test the macro, insert a new row into the Appointment table with the following values: ApptID of 11 PetID of 6 ApptTypeNum of 1 ApptDate of 8/1/2017 Notes of All good EstCharge of 30.00 ActualCharge of 25.00 8.

Check the Pet table and the Pet.AcctBalance field value for Mittens should be 57 instead of 32. Take a screenshot showing your Pet table in DataSheet view so the Mittens value can be seen and paste it in the space provided below. image text in transcribedimage text in transcribedimage text in transcribed

File + Run Home Design Tell me what you want to do 5 Single Step + G Convert Macros to Visual Basic Expand Collapse Expand Collapse Actions Actions All All Collapse/Expand BE Appointment Appointment: After Insert : Save Close EA Action Show All Catalog Actions Show/Hide Save As Tools Close Action Catalog x For Each Record in Pet Where Condition = [Appointment].[ActualCharge]=[Pet].[AcctBalance] Alias Pet Search... -D Program Flow Comment Group If Edit Record Alias Pet SetField Name Pet.AcctBalance Value = [Appointment].[ActualCharge]+[Pet].[AcctBalance] End EditRecord + Add New Action Data Blocks CreateRecord EP EditRecord ForEachRecord LookupRecord O Data Actions CancelRecordChange ClearMacroError DeleteRecord ExitForEachRecord LogEvent OnError RaiseError RunDataMacro Send Email SetField SetLocalVar StopAl Macros Stop Macro Navigation Pane Ready Num Lock File Home Create External Data Database Tools Help Fields Table Tell me what you want to do All Access Obje... Search... Tables Appointment Appointment Apptid - 1 PetiD - ApptTypeNun - ApptDate - Notes - EstCharge - ActualCharg 2 1 7/10/2019 All healthy. Gave 3 yr $50.00 $50 rabies shot. Next appt in 1 year NextApptDate Click to Add 7/10/2020 A ApptType Owner 2 5 2 $10.00 $10 8/12/2019 Pet 7/12/2019 Clipped. Clip again in 1 month Vet 3 4 1 $50.00 $75 8/12/2019 7/12/2019 Found fleas. Gave treatment. Follow-up in 1 month (cancel if not needed) 4 1 4 $50.00 $75 7/12/2019 7/11/2019 Cut ear. Cleaned wound. Applied antibiotics. Re-visit in 1 week 5 4 5 8/16/2019 Ear healed $20.00 $20 Window Shije 6 14 3 $125.00 $125 7/25/2019 7/18/2019 Spayed. Follow-up in 1 week 7 11 4 $50.00 $50 7/17/2019 Allergies reoccurred. Prescribe antihistamines 8 9 3 $125.00 $125 7/22/2019 7/15/2019 Spayed. Follow-up in 1 week 9 7 1 $50.00 $50 7/20/2020 7/18/2019 All healthy. Rabies due next year. Next appt in 1 year 10 9 5 7/22/2019 Incision healed well $20.00 $20 Record: 12 of 12 > No Filter Search Datasheet View Num Lock LECopy y 1 Dog File Home Create External Data Database Tools Help Fields Table Tell me what you want to do X Cut 7 A Ascending 7 Selection New Totals Sc Replace Calibri 11 AL Descending Advanced CC Save abc Spelling > Go To BI VE Tv View Paste Filter Refresh Find & Format Painter 20 Remove Sort Y Toggle Filter All X Delete More Select A A-2 Views Clipboard Sort & Filter Records Find Text Formatting All Access Obje... o Pet X PetID PetName VetID - AnimalTy - Weigh - Age Sex AcctBalance - OwnerNum - Click to Add Search. Fluffy 1 Cat 14.2 5 F $57 MJ001 Tables 2 Freckles 1 Cat 5.7 0.5 M $129 JJ001 Appointment 3 Spot 52.3 4.5 M $0 BA001 3 ApptType 4 Tabitha 1 Cat 9.1 7 F $0 JS001 Owner 5 Rover 1 Dog 85.5 3M $238 LW001 FE Pet 6 Mittens 1 Cat 12 2M $32 SM001 7 Sparky 1 Dog 35.6 6 M $225 Vet CB001 8 Rex 1 Dog 38 4.5 M $142 MR001 9 Muffin 2 Cat 8.4 0.5 F $49 MW001 10 Gus 85.6 8 M $197 PD001 11 Boomer 2 Dog 28.7 5 M $0 CT001 12 Buddy 2 Cat 16.8 12 M $190 BA001 13 Socks 2 Cat 11.3 15.5 F $0 JW001 14 Cuddles 2 Dog 20.1 0.5 F $57 MR001 0 0 0 + FEE + 2 Dog Record: 1 1 of 14 No Filter Search Datasheet View Num Lock File + Run Home Design Tell me what you want to do 5 Single Step + G Convert Macros to Visual Basic Expand Collapse Expand Collapse Actions Actions All All Collapse/Expand BE Appointment Appointment: After Insert : Save Close EA Action Show All Catalog Actions Show/Hide Save As Tools Close Action Catalog x For Each Record in Pet Where Condition = [Appointment].[ActualCharge]=[Pet].[AcctBalance] Alias Pet Search... -D Program Flow Comment Group If Edit Record Alias Pet SetField Name Pet.AcctBalance Value = [Appointment].[ActualCharge]+[Pet].[AcctBalance] End EditRecord + Add New Action Data Blocks CreateRecord EP EditRecord ForEachRecord LookupRecord O Data Actions CancelRecordChange ClearMacroError DeleteRecord ExitForEachRecord LogEvent OnError RaiseError RunDataMacro Send Email SetField SetLocalVar StopAl Macros Stop Macro Navigation Pane Ready Num Lock File Home Create External Data Database Tools Help Fields Table Tell me what you want to do All Access Obje... Search... Tables Appointment Appointment Apptid - 1 PetiD - ApptTypeNun - ApptDate - Notes - EstCharge - ActualCharg 2 1 7/10/2019 All healthy. Gave 3 yr $50.00 $50 rabies shot. Next appt in 1 year NextApptDate Click to Add 7/10/2020 A ApptType Owner 2 5 2 $10.00 $10 8/12/2019 Pet 7/12/2019 Clipped. Clip again in 1 month Vet 3 4 1 $50.00 $75 8/12/2019 7/12/2019 Found fleas. Gave treatment. Follow-up in 1 month (cancel if not needed) 4 1 4 $50.00 $75 7/12/2019 7/11/2019 Cut ear. Cleaned wound. Applied antibiotics. Re-visit in 1 week 5 4 5 8/16/2019 Ear healed $20.00 $20 Window Shije 6 14 3 $125.00 $125 7/25/2019 7/18/2019 Spayed. Follow-up in 1 week 7 11 4 $50.00 $50 7/17/2019 Allergies reoccurred. Prescribe antihistamines 8 9 3 $125.00 $125 7/22/2019 7/15/2019 Spayed. Follow-up in 1 week 9 7 1 $50.00 $50 7/20/2020 7/18/2019 All healthy. Rabies due next year. Next appt in 1 year 10 9 5 7/22/2019 Incision healed well $20.00 $20 Record: 12 of 12 > No Filter Search Datasheet View Num Lock LECopy y 1 Dog File Home Create External Data Database Tools Help Fields Table Tell me what you want to do X Cut 7 A Ascending 7 Selection New Totals Sc Replace Calibri 11 AL Descending Advanced CC Save abc Spelling > Go To BI VE Tv View Paste Filter Refresh Find & Format Painter 20 Remove Sort Y Toggle Filter All X Delete More Select A A-2 Views Clipboard Sort & Filter Records Find Text Formatting All Access Obje... o Pet X PetID PetName VetID - AnimalTy - Weigh - Age Sex AcctBalance - OwnerNum - Click to Add Search. Fluffy 1 Cat 14.2 5 F $57 MJ001 Tables 2 Freckles 1 Cat 5.7 0.5 M $129 JJ001 Appointment 3 Spot 52.3 4.5 M $0 BA001 3 ApptType 4 Tabitha 1 Cat 9.1 7 F $0 JS001 Owner 5 Rover 1 Dog 85.5 3M $238 LW001 FE Pet 6 Mittens 1 Cat 12 2M $32 SM001 7 Sparky 1 Dog 35.6 6 M $225 Vet CB001 8 Rex 1 Dog 38 4.5 M $142 MR001 9 Muffin 2 Cat 8.4 0.5 F $49 MW001 10 Gus 85.6 8 M $197 PD001 11 Boomer 2 Dog 28.7 5 M $0 CT001 12 Buddy 2 Cat 16.8 12 M $190 BA001 13 Socks 2 Cat 11.3 15.5 F $0 JW001 14 Cuddles 2 Dog 20.1 0.5 F $57 MR001 0 0 0 + FEE + 2 Dog Record: 1 1 of 14 No Filter Search Datasheet View Num Lock

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Ai And The Lottery Defying Odds With Intelligent Prediction

Authors: Gary Covella Ph D

1st Edition

B0CND1ZB98, 979-8223302568

More Books

Students also viewed these Databases questions

Question

Identify the different methods employed in the selection process.

Answered: 1 week ago

Question

Demonstrate the difference between ability and personality tests.

Answered: 1 week ago