Solved

Access 2010 Loop to update date field

Posted on 2014-02-04
4
534 Views
Last Modified: 2014-02-05
Hi Experts,

I'm trying to find a way to use a date (input from form) to update the date records in a table.  Using the start date provided by the user, the date records in the table should be updated in sequence but the first date for SunWk1 would equal the user provided date.  The order of the records is important; it is for a menu that is 28 days long and starts with SunWk1 through SatWk4.  I've tinkered with a loop but can't figure out how to have each date correspond to the order of the menu days.  I read that I should use a query to order the menu days but these are static (meaning they will not be changed) and can't figure out how a query will sort the fields.  I've attached the form and table that are affected.  Thank you in advance for any help!
Sample-Database.accdb
0
Comment
Question by:Skip Sleeper
[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
4 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 39834243
0
 

Author Comment

by:Skip Sleeper
ID: 39834384
Hi Rey,

This is perfect--thank you!  Could I ask a few questions?

What is the variable "j" for?

What is the significance of "vbSunday"--is this a reserved word in VBA?

Does the cmd MoveFirst start at the beginning of the list?

Thanks again!
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39834391
<What is the variable "j" for? > nothing, I did not use it. you can delete it.

<What is the significance of "vbSunday"--is this a reserved word in VBA?> Yes, it is a constant for "Sunday" and has a value of 1, first day of the week.


<Does the cmd MoveFirst start at the beginning of the list?> yes, first record of the recordset.
0
 

Author Comment

by:Skip Sleeper
ID: 39835497
Thanks again Rey, it's really appreciated!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
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…

734 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