Do ...Loop Until macro help

A

Ann

I need help with setting up a macro Do..Loop Until
(condition) so that users can't bypass Checking Out
Trailers into the db without "Checking Out" previous
instance of the same Trailer already in the database.

Such as Trailer 489 Checked In on 8/15/04 pm.
2 Days later, Trailer 489 is back again to be Checked In
on 8/17/04 am, but it was never Checked Out on 8/15/04.

Currently, I have a macro set up as
Macro Name: Check TrailerID
Condition:([Check In Subform]![Date and Time Out]Is Null])
Action: OpenForm ...; Form is called [Check Out]
....RunMacro
....MsgBox

I would like for the Do..Loop Until macro to Repeat until
the users goes into the Check Out form and actually
Checks Out Trailer 489 from 8/15/04, before they can
Check In the Trailer on 8/17/04.
Please advise. Thanks.
 
S

Steve Schapel

Ann,

I am sorry, on the basis of what you have told us, I can't really get a
precise handle on what you are trying to do here. But there is no such
thing as a "Do..Loop Until macro". And in any case, I don't really
think the concept of some sort of repeating process is a good way to
validate your data entry. You may like to consider options. For
example, on your Check Out form, you could have the textbox for the
date/time disabled. When the Trailer number is entered, you could look
up the most recent transaction for that trailer, and if it's a CheckIn,
you can then enable the date/time textbox... If you want to use a macro
for this, the SetValue action would be applicable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top