Asked by:
Updating multiple selected records in continuous form

Question
-
Hi Community, I need help in a task which must be fairly simple for experts. But for a newbie like <g class="gr_ gr_113 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" data-gr-id="113" id="113">me</g> it is creating nightmares.
I need a Form where <g class="gr_ gr_195 gr-alert gr_tiny gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" data-gr-id="195" id="195">i</g> can select X number of records from the table and put a date stamp in respective date filed of those selected records.
I have named date field "Date_Selected"
Maybe some buttons with
+10 (this button should select first 10 records without datestamp and put current date)
+50 (this button should select first 50 records without datestamp and put current date)
+100 (this button should select first 100 records without datestamp and put current date)
+500 (this button should select first 500 records without datestamp and put current date)
Clear
I then want to export selected records using a query to excel.
I will really appreciate the help from experts.
Thanks in advance :)
Friday, March 16, 2018 3:03 PM
All replies
-
Hi,
Have you considered using a Yes/No field for selecting each record? You can then use VBA in the AfterUpdate event of the Checkbox on the Form to assign a date or remove it, depending on whether the box is checked or not.
Just my 2 cents...
Friday, March 16, 2018 3:11 PM -
<g class="gr_ gr_5 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="5" id="5">thats</g> a good idea. But <g class="gr_ gr_48 gr-alert gr_tiny gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" data-gr-id="48" id="48">i</g> might need more help with writing VBA :(Friday, March 16, 2018 3:29 PM
-
In the AfterUpdate of the Checkbox, you could try something like this:
If Me.CheckboxName = True Then Me.DateFieldName = Date() Else Me.DateFieldName = Null End If
The above will enter/assign today's date to the selected record or delete the date when the record is deselected using the checkbox.
Hope it helps...
Friday, March 16, 2018 3:35 PM -
thanks for your help.
can <g class="gr_ gr_81 gr-alert gr_tiny gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" data-gr-id="81" id="81">i</g> make a button to uncheck <g class="gr_ gr_124 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="124" id="124">specific</g> number of records with no date entered?
Friday, March 16, 2018 4:02 PM -
Hi,
Sort of... You can uncheck ALL records without a date by executing an UPDATE query. For example:
CurrentDb.Execute "UPDATE TableName SET CheckboxFieldName=False WHERE DateFieldName Is Null", dbFailOnError
Me.Requery
Hope it helps...
- Proposed as answer by Deepak Saradkumar PanchalMicrosoft contingent staff Monday, March 19, 2018 5:55 AM
Friday, March 16, 2018 4:09 PM -
thanks <g class="gr_ gr_9 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="9" id="9">alot</g> for your help :)Friday, March 16, 2018 5:02 PM
-
Hi,
You're welcome. Let us know if you get stuck. Good luck with your project.
Friday, March 16, 2018 5:10 PM -
thanks :)Friday, March 16, 2018 5:16 PM
-
From your last post, It looks like your issue is solved now from the suggestion given by .theDBguy
This thread is still open.
I suggest you to mark the suggestion given by .theDBguy as an answer.
It will help us to close this thread and it will also helpful for other community members who will have same kind of issue in future.
Thanks for your understanding.
Regards
Deepak
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Monday, March 19, 2018 5:54 AM