looping macros

bluey

Registered User.
Local time
Today, 23:12
Joined
May 14, 2002
Messages
22
Ms Access Macro
hi
ive got a macro that calculates and updates weekdates
i can only make a weeks worth of dates at a time.
Are there any conditions that will allow me to loop my macro but that allow me to stop it from making to many dates (infinate loop)
any help is appriciated
thanks:)
 
Last edited:
This is much better done in vba, give us some idea of what you are actually doing
 
i kow but my boss set it up .

EXP: i have to auto matically create dates and names at the moment the user opens a from and enters a date (06/01/02) then presses next button this makes a control date and opens another form then they press next and the form creates a weeks worth of dates like so: the dates have to start on a sunday.

Rota detail table(There is a header to)
| Time | Dayname | Day no |
====================================
06/01/02 | Sunday #####0 i have to add other bits
07/01/02 | Monday #####1 but this is as far as i
08/01/02 | Tuesday#####2 have got
09/01/02 | Wednesday## 3
10/01/02 | Thursday####4
11/01/02 | Friday ##### 5
12/01/02 | Saturday####6
#= space
i would like it to still do this but id like the user to be able to make more than a weeks worth if they like.
number 7 is null
i dont know how to program vba ive just started to learn it.
i hope i made it a littel clearer if not ile try again
 
Last edited:
It would appear that some bosses can be as dangerous to a db as users:)
Now you can gain some Brownie points by saving your boss valuable storage space, you don't need to store the Day or the number associated with it. An unbound text box added to the form with it's control source set to the date field and the format set to dddd will display the relevant day, a simple function will give the day number assuming you only want them to go from 1 to 6, working on the date add part
 
The 1- 6 is the week day function which allow the user to set the day they are entering

it does not have to be a set number of weeks it just has to up date the number of weeks specifyed.

if it creates more than one day then yes please id like to know how to do it.:D

i did get some code from some one but i dont understand it and if i say that to him he sounds like [Ilk] gurr you are so thick why do i bother grrr you know that sort of thing.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom