Re: Message of the day pop-up?



Thank you for your interest, John.
How would I go about populating this LastDate field, and making it hold a
value from a previous day, rather than the current date? Would I have to
assign a specific date to each Procedure, or would dates be assigned
randomly? I guess my answer to your last question would be no, I don't know
how to do it. :(

Alternatively, is it possible to write code that would just rearrange the
records in a table or query, perhaps in the OnTimer event of a hidden form?
If I could do that, then I could just have the records shuffled daily, and
pull the top record from the table or query. If not possible, then would you
be kind enough to give me some guidance for your idea?

"John Spencer" wrote:

If I were doing this, I would have a utility table that had two fields
LastDate
ProcedureID

Then in the startup procedures of my database:
-- Check the last date field.
-- If it is today's date then show the procedure associated with the
ProcedureId
-- If LastDate is some other value, then update the values (last date =
Date() and ProcedureID = the next randomId generated by your randomizing
query. And then show the procedure associated with the procedureId

If you wanted to, you could just add a last shown date field to your
table of policies and check for today's date being = to the max date
stored in the policies table. If it isn't, select a record from
policies that does not have a date (is Null), set its date to Date() and
show the newly selected policy.

You would probably need some additional checking to make sure that at
least one policy had the last shown date as null and if none did, you
would need to update the last shown date to Null for all the records.

Do you understand how to do the above or do you need someone to write
the VBA procedure?

--

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================


A Paid Observer wrote:
I have looked through the posts thoroughly, and couldn't find one that would
help me to do what I want. If someone has answered this previously, my
apologies.
I want to create a "procedure of the day" message feature. I have a table
full of hundreds of written policies for various departments in my company
(tblPolicies,) and I would like to highlight a different policy each day in a
pop-up form for my Surveillance department employees to read. I have used a
randomizing query to pull up a random policy from the table on demand, but I
would like for just one policy to be the pop-up all day today, and for a
different policy to pop up all day tomorrow, etc.
I'm guessing the way to do this would be to program the query to rearrange
the records at say, midnight each day, then select the TOP record for my
message. However, I have no idea how to do this. Can anyone help me?

Thanks in advance!

.



Relevant Pages

  • Re: Message of the day pop-up?
    ... Create a form based on a query against the table that selects ... the record where the date in LastShown matches today's date ... Dateand ProcedureID = the next randomId generated by your randomizing ... show the newly selected policy. ...
    (microsoft.public.access.queries)
  • Re: Message of the day pop-up?
    ... "John Spencer" wrote: ... Create a form based on a query against the table that selects ... Dateand ProcedureID = the next randomId generated by your randomizing ... show the newly selected policy. ...
    (microsoft.public.access.queries)
  • Re: Message of the day pop-up?
    ... "John Spencer" wrote: ... Create a form based on a query against the table that selects ... Dateand ProcedureID = the next randomId generated by your randomizing ... show the newly selected policy. ...
    (microsoft.public.access.queries)
  • RE: Report Help
    ... In the above I've assume that the table is named Policies, ... references the original policy by its PolicyNumber. ... underlying query call the above function, ... The ReferencedPolicyNumber column in this case should be either Null or zero ...
    (microsoft.public.access.gettingstarted)
  • SQL query - duplicate records - different dates - how to get only latest information?
    ... I have a SQL query I need to design to select name and email addresses ... The information is in 2 tables, policy and customer, which share the ... The polno changes with every renewal Renewals in 2004 ... The policies would have poleffdates of 2004-03-21 (original 6 month ...
    (comp.databases.ms-sqlserver)