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

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

Computer Learning Zone

3 года назад

31,142 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@zdong1590
@zdong1590 - 26.09.2023 12:34

hello how do i auto update a field in another form instead? with both forms having same unique ids.

Ответить
@Jojosmith342
@Jojosmith342 - 10.08.2023 07:09

all thumbs up to one of the most favourite teachers 👍 thank you very much Richard for educating us

Ответить
@VforAllofUs
@VforAllofUs - 10.06.2023 06:48

YOU MADE MY DAY))) THNK YOU

Ответить
@sonmezb
@sonmezb - 28.10.2022 11:24

You are a natural teacher, excellent videos, love watching them.

Ответить
@MrKenCollectibles
@MrKenCollectibles - 04.10.2022 17:04

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.

Ответить
@raymondmimay3307
@raymondmimay3307 - 26.09.2022 13:19

@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?

Ответить
@ranjishiyama5875
@ranjishiyama5875 - 21.09.2022 05:13

This saved me a lot. Such a weird string concatenation!

Ответить
@anandmallikarjunan7775
@anandmallikarjunan7775 - 29.04.2022 18:27

Excellent video. A small video that got a big impact indeed. Wish you best of luck. Thanks.

Ответить
@carlosmrivas268
@carlosmrivas268 - 07.03.2022 05:11

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?

Ответить
@nemo9396
@nemo9396 - 18.02.2022 09:19

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

Ответить
@Quackamagooska
@Quackamagooska - 14.12.2021 17:51

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.

Ответить
@tutsecret499
@tutsecret499 - 27.09.2021 12:23

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?

Ответить
@akokohjoel9854
@akokohjoel9854 - 23.07.2021 20:32

Mr Rost you are the generation Master of ms access. Pls sir can the above VBA code be use in ms access 2010?

Ответить
@27oslec
@27oslec - 01.07.2021 13:15

Finally! Thanks for this video.. it solved my dlookup with a text criteria! Kudos..

Ответить
@27oslec
@27oslec - 26.06.2021 02:58

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.

Ответить
@emarreola
@emarreola - 07.06.2021 22:49

Thank you soooo much, been looking for this for ages!

Ответить
@rabidfollower
@rabidfollower - 25.03.2021 23:51

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.

Ответить
@bayanmobarak4661
@bayanmobarak4661 - 10.03.2021 16:45

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!

Ответить
@Sorrocasharked
@Sorrocasharked - 29.01.2021 23:44

Did I miss something, or do I also have to manually add the zone for the customer too?

Ответить
@gayanthafernando9395
@gayanthafernando9395 - 24.01.2021 18:01

Thanks sir , i am studing lot of thing from you.

Ответить
@beusekommetje
@beusekommetje - 21.01.2021 15:23

Really Helpful!

Ответить
@mayureshvirkar8337
@mayureshvirkar8337 - 03.12.2020 13:06

Suppose the matching field "State" is of datatype number. Then it should be "State=State" or "State='"&State&"''" ?

Ответить
@springsnature7037
@springsnature7037 - 08.10.2020 20:03

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!

Ответить
@garethwoodall577
@garethwoodall577 - 14.09.2020 11:00

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?

Ответить
@nishu621
@nishu621 - 20.08.2020 16:03

Thank you for wonderful explanation.

Ответить
@pvb1905
@pvb1905 - 20.08.2020 10:01

Thank You very much will see it deeply and will learn .
Salute to you SIR.

Ответить