Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Flag selected records

Posted on 2011-03-14
7
Medium Priority
?
311 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 1000 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

705 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