Cycle through records on a form

G

Guest

My company has decided to start a wellness inititive. One of the things we
are doing is creating a simple database for wellness tips. The plan is to
enter tips, link that table to all of our other databases, and create a
pop-up box that displays a tip whenever a user opens a database. I know some
coding, but not a lot, so even though there's probably a better way to do it,
I've decided to just use a form with a textbox. What I would like to have
happen is to have the text box cycle through the tips. For example, if
someone opens a database on their computer, they would get tip #1. When
someone else open their computer in another part of the building, they would
get Tip#2. Then if the first person closes out and re-opens their database,
they would get tip #3, etc. What's the best way to do this?

Any help is appreciated!

Tara
 
G

Guest

In the Wellness database have two tables.
TipTable ---
TipID – number – integer – primary key
Tip – text

TipCounter ---
TipCount – number – integer
MaxTip – number – integer

In each of the other databases link these tables. Build a query to show
TipID matching TipCount named TipShow.
SELECT TipTable.Tip
FROM TipCounter INNER JOIN TipTable ON TipCounter.TipCount = TipTable.TipID;

Use the query for popup form.

Create an update query named TipStep –
UPDATE TipCounter SET TipCounter.TipCount =
IIf([TipCount]=[MaxTip],1,[TipCount]+1);

Create a macro named Autoexec or if it exist add to it the following steps –
Open Form TipPopUp
Open Query TipStep
 

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