Hi Clifford,
Thanks for helping me. I do already have a form that keeps track of the
current amount of media we have (CDs, DVDs, Clam Shells, etc.). When the
number used for every job that is processed is entered it subtracts from
these totals and any new items purchased get added to these numbers so at any
given time the user can open the form and see what is available.
Unfortunately, he doesn't want to do this all the time and wants to have a
message appear at the time he opens the database that will tell him which
ones are low and need to be purchased.
My plan was to run a make-table query with the type and amounts remaining
that will run when the Switchboard form loads then a macro that checks the
totals in this table to see what is below a certain amount. That's why I
thought I could use DLookup in the macro. I've used it in the past but was
only looking up one field. Now I need to lookup two fields and am having a
hard time with the syntax.
The table is tblPackagingLowCountsNotification, the fields are
strMediaPackagingTypes and RemainingPackaging which comes from the following
calculation in the query ([lngPackagingStartingTotals]-[SumOflngCount]), the
query is qryPackagingLowCountsNotification.
"Clifford Bass" wrote:
> Hi Ann,
>
> I presume you deal with more than Clam Shells. What you might want to
> do is set up a query that lists all of the items that need reordering. Then
> set up a report that uses that query. In that report, use its No Data event
> to cancel the opening of the report. Then whenever you want to do the
> reminder you simply open the report. If there are any things that need
> reordering, they will be listed. When there are not any, the report will not
> show. If that will not do what you want, please post back with more detail
> as to when/how this check is being performed. While the user is doing
> something in a form? Under what circumstances? Other pertinent information?
>
> Clifford Bass
>
> "Ann" wrote:
>
> > Hi, I'm trying to find out how to use Dlookup to show a message box. I have
> > a table called tblPackagingLowCountsNotification with multiple fields, two of
> > which I am trying to use for the message box. One is strMediaPackagingType
> > and the other is RemainingPackaging. If the strMediaPackagingType is Clam
> > Shells and RemainingPackaging is less than 500 I want a message box to appear
> > that says it's time to order more Clam Shells.
> >
> > I've looked through all the dlookup information on the site and tried many
> > of them but can't get it to work. If there is a different way to do this
> > other then dlookup that's fine too. I'd really appreciate it if someone can
> > help me out. Thanks in advance.
|