Update filtered records on Form based on Textbox (1 Viewer)

Kumyi

New member
Local time
Today, 15:48
Joined
Jul 19, 2020
Messages
3
Hi to all, I'm new to this group and this will be my first thread to post.
I'm new on learning MS Access and willing to learn more.
Is there any VBA to update filtered records on form based on textbox using button.
The data to be input on textbox might be date or text data.
Hoping someone can help me through this matter.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 07:48
Joined
Oct 29, 2018
Messages
21,473
Hi. Welcome to AWF!

VBA is very powerful and can do almost anything you need. However, I am not sure I understand your question enough to be able to answer it. Can you give us more details or post screenshots?
 

Kumyi

New member
Local time
Today, 15:48
Joined
Jul 19, 2020
Messages
3
Thank you theDBguy for quick response.

Herewith I attached sample file. The main purpose is, when i filter the Drawing No. I want to update the (3)Three columns mainly, 1. Release No. - which is text data 2. Release Date - Medium Date Format and 3. In Charge - which is text data also.
I'm hoping that you could help me to save more time on updating my release records.

Thanks in advance!
 

Attachments

  • Sample_File.accdb
    704 KB · Views: 78

theDBguy

I’m here to help
Staff member
Local time
Today, 07:48
Joined
Oct 29, 2018
Messages
21,473
Thank you theDBguy for quick response.

Herewith I attached sample file. The main purpose is, when i filter the Drawing No. I want to update the (3)Three columns mainly, 1. Release No. - which is text data 2. Release Date - Medium Date Format and 3. In Charge - which is text data also.
I'm hoping that you could help me to save more time on updating my release records.

Thanks in advance!
Hi. If I understand what you're trying to do, it's as easy as running an UPDATE query. For example, let's say you filtered the subform by entering 026 in the search box. You're basically applying a filter to it using the following criteria: [DRAWING_NO] Like "*026*"

So, if you want to update the resulting records from that filter, you simply apply the same criteria in your UPDATE query. For example:

Code:
UPDATE Material SET RELEASE_NO=Forms!FormName.Release_No, RELEASE_DATE=Forms!FormName.Release_Date
WHERE [DRAWING_NO] Like "*026*"

Hope that helps...
 

Kumyi

New member
Local time
Today, 15:48
Joined
Jul 19, 2020
Messages
3
Hi. If I understand what you're trying to do, it's as easy as running an UPDATE query. For example, let's say you filtered the subform by entering 026 in the search box. You're basically applying a filter to it using the following criteria: [DRAWING_NO] Like "*026*"

So, if you want to update the resulting records from that filter, you simply apply the same criteria in your UPDATE query. For example:

Code:
UPDATE Material SET RELEASE_NO=Forms!FormName.Release_No, RELEASE_DATE=Forms!FormName.Release_Date
WHERE [DRAWING_NO] Like "*026*"

Hope that helps...

Hi theDBguy,
Thank you again for your swift response.
I'll be honest with you I'm not fond as of now with queries.
So I'm taking this opportunity and be straight forward to ask you to please kindly make an example on the sample database I sent.
Hoping for your kind consideration.
 

Users who are viewing this thread

Top Bottom