Solved

Flag selected records

Posted on 2011-03-14
7
286 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
  • 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
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.

 

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
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…

820 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