AfterUpdate Event & DLookup Function in Microsoft Access - How to Look Up Values from Table to Form

  Рет қаралды 32,698

Computer Learning Zone

Computer Learning Zone

Күн бұрын

Пікірлер: 59
@Jojosmith342
@Jojosmith342 Жыл бұрын
all thumbs up to one of the most favourite teachers 👍 thank you very much Richard for educating us
@sonmezb
@sonmezb 2 жыл бұрын
You are a natural teacher, excellent videos, love watching them.
@599CD
@599CD 2 жыл бұрын
Thank you very much
@ReneB099
@ReneB099 11 ай бұрын
Excellent tutorial video Richard. Following your clear explanation, I was able to successfully modify and apply your code to my own application. A big thank you. ☺👍
@599CD
@599CD 11 ай бұрын
Nice work!
@Quackamagooska
@Quackamagooska 3 жыл бұрын
This just helped me solve a perplexing problem that, in hindsight, was so obvious! I also found two other issues that this resolves, better. Signed up as a Silver Member, a month ago and it is paying off.
@599CD
@599CD 3 жыл бұрын
Glad you're enjoying the videos! :)
@springsnature7037
@springsnature7037 4 жыл бұрын
Honestly, man, thank you so much! This was such a great help to me as I'm learning about Access in college and homework was being a pain. Subscribed!
@599CD
@599CD 4 жыл бұрын
You're very welcome!
@anandmallikarjunan7775
@anandmallikarjunan7775 2 жыл бұрын
Excellent video. A small video that got a big impact indeed. Wish you best of luck. Thanks.
@599CD
@599CD 2 жыл бұрын
Welcome
@27oslec
@27oslec 3 жыл бұрын
Finally! Thanks for this video.. it solved my dlookup with a text criteria! Kudos..
@599CD
@599CD 3 жыл бұрын
Glad it helped!
@ranjishiyama5875
@ranjishiyama5875 2 жыл бұрын
This saved me a lot. Such a weird string concatenation!
@599CD
@599CD 2 жыл бұрын
Yep
@VforAllofUs
@VforAllofUs Жыл бұрын
YOU MADE MY DAY))) THNK YOU
@emarreola
@emarreola 3 жыл бұрын
Thank you soooo much, been looking for this for ages!
@599CD
@599CD 3 жыл бұрын
Glad I could help!
@pvb1905
@pvb1905 4 жыл бұрын
Thank You very much will see it deeply and will learn . Salute to you SIR.
@599CD
@599CD 4 жыл бұрын
You are most welcome
@zdong1590
@zdong1590 Жыл бұрын
hello how do i auto update a field in another form instead? with both forms having same unique ids.
@599CD
@599CD Жыл бұрын
599cd.com/ask
@MrKenCollectibles
@MrKenCollectibles 2 жыл бұрын
I'm new to using MS Access. I need to find a way to update a field with a new date when another field is changed. I have an pending email table with the following fields (email_box, sent by, receive_date, subject, track_date, complete_date, category). I need to update the track date if the user changes the category. Any assistance you could provide would be greatly appreciated.
@599CD
@599CD 2 жыл бұрын
599cd.com/AfterUpdate
@599CD
@599CD 2 жыл бұрын
That's what this video shows... updating one field when another is changed.
@gayanthafernando9395
@gayanthafernando9395 4 жыл бұрын
Thanks sir , i am studing lot of thing from you.
@599CD
@599CD 4 жыл бұрын
Glad to hear that
@garethwoodall577
@garethwoodall577 4 жыл бұрын
Hi Richard, thanks for the awesome video. You mentioned a ZIP video (around 11 mins) and vlookup, is it in the links above as I couldnt see it?
@599CD
@599CD 4 жыл бұрын
VLOOKUP was in the comments below the video (click SEE MORE) but you're right - I forgot the ZIP Code Lookup. I just added it: kzbin.info/www/bejne/a3eZmIyNbpaqeKs
@tutsecret499
@tutsecret499 3 жыл бұрын
What if say do DLOOKUP if DOB field is not null on the table, then populate the Age field column in the table with the data on the Calculated Age field column from the query. Is that possible that using DLOOKUP?
@599CD
@599CD 3 жыл бұрын
Use the NZ function. If the DOB is not in the table, it will return a zero. Then with IIF you could say if the DOB is zero, set the age to zero. 599cd.com/NZ - 599cd.com/IIF
@tutsecret499
@tutsecret499 3 жыл бұрын
Thank you. I watched the DLOOKUP after update. I will start set it up for my situation and see if it will work, and I let you know. Cross your fingers.
@bayanmobarak4661
@bayanmobarak4661 3 жыл бұрын
Hello Richard, I have a value of planned production that will be *updated* each week, I want this value to be stored on one of my column in my database. I`m thinking about making a form with a single input box to put the value, but i`m confused about how to tell access to store that value on a certain table, I mean is it possible to write a function in a table field on access? Can you please advice me about the right approach to do this ? Thank you!
@599CD
@599CD 3 жыл бұрын
I would make a related table for your updates and display them in a subform. 599cd.com/Subform
@bayanmobarak4661
@bayanmobarak4661 3 жыл бұрын
@@599CD Thank you so much for the fast respond! but can I know what the purpose of displaying it on a subform? I need the planned production to be automatically filled on a table when the user fill a form.
@599CD
@599CD 3 жыл бұрын
I don't have any idea what you mean by that. Please see 599cd.com/Context
@akokohjoel9854
@akokohjoel9854 3 жыл бұрын
Mr Rost you are the generation Master of ms access. Pls sir can the above VBA code be use in ms access 2010?
@599CD
@599CD 3 жыл бұрын
Thank you. Yes, that code should work in pretty much every version of Access going back as far as I can remember.
@27oslec
@27oslec 3 жыл бұрын
Hello.. this is perhaps what i am looking for. But i am having trouble with the currency field (unit price). Your expertise can give me a head up.
@599CD
@599CD 3 жыл бұрын
I need more specifics.
@carlosmrivas268
@carlosmrivas268 2 жыл бұрын
Hi, I' have been trying to auto-populate a field by looking up a field in another table for hours, and when I found your tutorial I thought I got it, but it didn't work as it should, all I keep getting it's the first value from the table I'm doing the look up. I tried sorting the table but whatever info I enter, I always get back the first value in the table, What could I been doing wrong?
@599CD
@599CD 2 жыл бұрын
Well, what's your statement?
@raymondmimay3307
@raymondmimay3307 2 жыл бұрын
@Computer Learning Zone I have a query named "StudentQ". It has a field named "Name". I created a blank form then add a combo box named "NameCombo" where it shows the names in the field "Name" from the query "StudentQ". I then created a text box and named it "NameBox". Now, I want to show in the textbox "NameBox" whatever is chosen in the combo box "NameCombo". So I did a DLookUp in the code builder. Me.Namebox = DLookUp("Name", "StudentQ", "Name = " & Me.NameCombo) But it always says "syntax error (missing operator) in query expression ...." Why is that? How can I correct that?
@599CD
@599CD 2 жыл бұрын
I get a ton of questions every day, and I don't have time to answer them all here on KZbin. Feel free to submit your question on my website at: 599cd.com/AskYT
@nishu621
@nishu621 4 жыл бұрын
Thank you for wonderful explanation.
@599CD
@599CD 4 жыл бұрын
You are welcome!
@Sorrocasharked
@Sorrocasharked 4 жыл бұрын
Did I miss something, or do I also have to manually add the zone for the customer too?
@599CD
@599CD 4 жыл бұрын
You probably missed something. Watch it again. The Zone is a field in the CustomerT. When you pick a state they get assigned a Zone, but it can be changed. This is why we needed an AfterUpdate event with DLOOKUP instead of just a relationship.
@emielbeus
@emielbeus 4 жыл бұрын
Really Helpful!
@599CD
@599CD 4 жыл бұрын
Glad it was helpful!
@rabidfollower
@rabidfollower 3 жыл бұрын
The user says that sometimes he needs to enter zones that are different from the defaults. So the AfterUpdate event needs to prevent accidentally overwriting values that the user has filled in himself -- especially when Access often doesn't let the user undo mistakes. In your example, even if you type in the same state as before, the AfterUpdate event will still run, because Access sees that as an "update" too. You need to prevent accidental erasure of values at all cost. If I were the user, I would have AfterUpdate change the zone only when the zone is empty. I would also add an unbound field showing the default zone right next to the bound field of the actual zone in the table, so the user could see if they are different.
@599CD
@599CD 3 жыл бұрын
There's always something more you can add... The more I play with a database, the more I find I want to change. These are quick tip videos. I cover many more in-depth situations in my full lessons.
@mayureshvirkar8337
@mayureshvirkar8337 4 жыл бұрын
Suppose the matching field "State" is of datatype number. Then it should be "State=State" or "State='"&State&"''" ?
@599CD
@599CD 4 жыл бұрын
You don't need quotes for numbers. Always keep your values outside of the quotes. They SOMETIMES work inside the quotes, but they ALWAYS work outside. "CustomerID=" & ID "State=""" & MyState & """" "DateOfBirth=#" & DOB & "#"
@mayureshvirkar8337
@mayureshvirkar8337 4 жыл бұрын
@@599CD Thank you. Very useful content.
@599CD
@599CD 4 жыл бұрын
You're very welcome.
@nemo9396
@nemo9396 3 жыл бұрын
I didn't understand if in your VBA code, the first zone you write is the name of the text box in the form or the name of the field in the customer table. Edit: I figured it out so it's like this: Name of field box in the form = Dlookup ("[field name to look up]", "table where field is to be looked up", "[field name to look up] =" & Forms![Name of Form]!Name of field box where the value is located") Edit 2: Yeah well actually it works but it doesn't quite... I can't for the life of me make this work haha
@599CD
@599CD 2 жыл бұрын
Without seeing exactly what you're doing, I can't tell ya.
@theresaflorek8798
@theresaflorek8798 Жыл бұрын
@@599CD I am the same. You should name your fields differently so that we know which field from which table you are referring - State in your customer table and then StateName in the StateZoneT table. Zone in the customer table and ZoneNbr in the StateZoneT table.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
How to Use DLookup in Microsoft Access
15:48
Sean MacKenzie Data Engineering
Рет қаралды 21 М.
What to do if DLookup is Slow in your Microsoft Access Database
15:05
Computer Learning Zone
Рет қаралды 3,6 М.
How to use DLOOKUP function + AFTER UPDATE function in Ms Access.
8:33
Edcelle John Gulfan
Рет қаралды 13 М.
53. VBA - Recordsets Part 1 (Programming In Microsoft Access 2013) 🎓
20:01
Programming Made EZ
Рет қаралды 176 М.
After Update on Form Controls in Microsoft Access
11:10
Sean MacKenzie Data Engineering
Рет қаралды 9 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН