Solved After Update/Insert Macros (1 Viewer)

MelissaMuz

New member
Local time
Today, 15:02
Joined
Oct 18, 2022
Messages
27
Hi I'm completely new to Macros (and pretty new to Access in general). I was wondering if anyone could help me to set up one.

I am wanting to update a field in my table automatically when I input information into another field in the same table. The information needed for these fields is stored in a separate table. I just want the corresponding data to be auto filled into my table.

e.g. when I input the Part Code, I would like the quantity field to update with the corresponding data.

If there is another way to do the same I don't mind at all! Thank you in advance.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:02
Joined
May 7, 2009
Messages
19,247
on design view of your table, add Default Value to Quantity Field.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:02
Joined
May 7, 2009
Messages
19,247
sorry, wrong answer.
take a look at table1 in design view.
while on design view, on the ribbon->Table Design->Create Data Macro, and see the Before Change macro.
now open table1 in normal view and enter a product code that can be found in master_product table.
 

Attachments

  • production.accdb
    528 KB · Views: 95

MelissaMuz

New member
Local time
Today, 15:02
Joined
Oct 18, 2022
Messages
27
sorry, wrong answer.
take a look at table1 in design view.
while on design view, on the ribbon->Table Design->Create Data Macro, and see the Before Change macro.
now open table1 in normal view and enter a product code that can be found in master_product table.
This is great, thanks a lot for your help!
 

MelissaMuz

New member
Local time
Today, 15:02
Joined
Oct 18, 2022
Messages
27
sorry, wrong answer.
take a look at table1 in design view.
while on design view, on the ribbon->Table Design->Create Data Macro, and see the Before Change macro.
now open table1 in normal view and enter a product code that can be found in master_product table.
Unfortunately I'm struggling with this! It says "you cannot add or change a record because a related record is required in table 'parts'" (the table I am trying to pull information from). But there is already a relating record in that table so I'm unsure what could be causing this.
 

MelissaMuz

New member
Local time
Today, 15:02
Joined
Oct 18, 2022
Messages
27
Unfortunately I'm struggling with this! It says "you cannot add or change a record because a related record is required in table 'parts'" (the table I am trying to pull information from). But there is already a relating record in that table so I'm unsure what could be causing this.
oops nevermind i fixed it.
 

Users who are viewing this thread

Top Bottom