How do you get a field to requery in a datasheet

66 Views Asked by At

I am trying to create a MS Access table that has relationships to multiple tables. The value of the field 2 is queried on the value of field one. I understand how to get a form to perform the requery. What I am trying to do is have the datasheet view do the requery when I proceed to the next row in the table.

ID Item Description Category SubCategory
2 Firearms Rifle
3 Crypto Rifle Should be: Bitcoin Handgun Ethereum Shotgun Litecoin
4 Firearms Handgun
5 Firearms
6 Crypto Litecoin
7 Crypto Ethereum
8 Tools Tablesaw

I have table called Assets.
I created a table called Category that contains the categories.
I created a table called Subcategory. It contains the Category as the primary key, and Subcategory.
I have created a query that pulls in just the Subcategories for the given category.

On the datasheet view, when you place the cursor in the Category field, it pulls in the category as it should. Select the Category, then move the cursor to the Subcategory. It pulls in the last category list that was used. I have to hit the refresh button (F5) in order for the content to become the current value (F5 does the refresh/requery).

In the datasheet, what I am wanting is to have the Subcategory field requery when the cursor moves to the Subcatagory field. I can get this to work in a Form, just not datasheet. Can you provide specific instructions on how this is possible, if it is possible. I have googled just about everything, and most of the found content only talks about forms, not datasheets. There was even a question about this same problem here, but it didn't answer if you could do this in the datasheet, only using a form. Again, I can get forms and subforms to work, I just can't get the datasheet view to work.

Any assistance to understand how to make this work would be wonderful.

I have tried using Macro and VBA coding to get it to work. Again, it works fine with forms. I just want datasheet to do the same.

0

There are 0 best solutions below