Solved

Flag selected records

Posted on 2011-03-14
7
301 Views
Last Modified: 2012-05-11
Is there some way that I could, in a continuous form, let the user set filters and then change a logical field (print) for all of the records that remain displayed/selected in the dataset?

I want to export all the selected records, but in a specific format.  I plan to append the selected records to a table and then export to an Excel file.
0
Comment
Question by:PTaylorM2
[X]
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
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35130926

how are you setting the filter?

if you happened to build a filter and store it in a string variable, say strFilter, you can use that filter to update the logical field

currentdb.execute "update table set [logicalfield]=-1 where " & strFilter
0
 
LVL 77

Expert Comment

by:peter57r
ID: 35130954
If you want to select all the visible records there shold be no need for a flag.
WHat matters is how you are setting the filters?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35130956

You cannot select non-contiguous record in a continuous form.

For this reason, you may want to use a  Listbox for this:
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

Author Comment

by:PTaylorM2
ID: 35137013
My wishful  thinking was to allow the user to right-click and set filters however they wish, and then click a button to flag any records (set a binary field to "yes") for those still being displayed in the recordset.
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 250 total points
ID: 35137154
place this in the click event of a button

with me.recordset
   do until .eof
      .edit
       !YesNoField=-1
       .update
       .movenext
  loop
end with
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35138141
Then can you please take a step back and explain what your ultimate goal is here?

Setting a filter, flagging records or both?
0
 

Author Closing Comment

by:PTaylorM2
ID: 35138841
I wanted to allow a user to drill down through a set of records by using multiple filters and then save the results of the inquiry by flagging the records with a binary field.  
One use would be to copy those records into another table (to control the output) and export them into an Excel file.

This solution works. Thanks.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

617 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