Use VBA to Update All on Filtered Form

Posted on 2011-02-27
Last Modified: 2012-05-11

Take a simple table with 5,000 records;

I have a continuous form which display these 4 fields.
I will use the standard "filter" facilities to restrict which records are displayed.

My Requirement: When I click on a button how do I set the [Price] field to zero for the records that are filtered.

I guess, the key thing here is how do I process my update on ONLY the filtered records.

Question by:Patrick O'Dea
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34991972

with me.recordset
end with
LVL 120

Accepted Solution

Rey Obrero (Capricorn1) earned 500 total points
ID: 34991980

with me.recordset
    do until .eof
end with
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34992002
you have to run the codes after applying your filter..

Author Closing Comment

by:Patrick O'Dea
ID: 34992027
Thanks, Perfect!

An elegant solution.
I have never used recordsets before.

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question