popup message when new record added (1 Viewer)

CJ_London

Super Moderator
Staff member
Local time
Today, 07:34
Joined
Feb 19, 2013
Messages
16,607
Enough to fully demonstrate what you are trying to do.

At the moment you are asking us to fix the car, but only providing a wheel to look at.

Or at least respond to the other threads where a full solution has been provided and explain why it does not do what you want.
 

murray83

Games Collector
Local time
Today, 07:34
Joined
Mar 31, 2017
Messages
728
I have the following code which displays the number of records in a message box ( as below )

Code:
Dim varTotal As Integer
   Me.RecordsetClone.MoveLast
   varTotal = Me.RecordsetClone.RecordCount
   MsgBox "Number of loaded records: " & varTotal

Also I have just inputted a textbox at the top which does a dcount ( as shown this will be hidden when live ) which does the same but without the message box
Code:
=DCount([ID],"main")


What I would like is to have a base figure or such and another box which counts and then an IF statement something like this

Code:
IF “LiveFigure” > “BaseFigure” Then
Switch to Access 
MsgBox (“New Record Text”)
Else
Nothing
End If
 

CJ_London

Super Moderator
Staff member
Local time
Today, 07:34
Joined
Feb 19, 2013
Messages
16,607
your last bit of code will not work in Access since you are already in Access.

It is still not at all clear what you are trying to achieve - I understand the principle but not how you want it to work. Various suggestions have been made by myself and others but you seem to ignore those and say 'how about this'.

Go back to the beginning. Describe the setup (people in one office, multiple offices) all using access/not using access, etc. Then clearly describe what you want to happen under various situations - people in the office/not in the office, people have access open/do not have access open. Message to be stored/not stored so user can see when they next login to windows/open access or another app. What is the message to contain. What do you want users to do about the message when they see it etc.

And don't make it a wish list, it needs to be a clear requirement - clarify with your boss if you need to. Pretty much anything can be done, but it might involve approaching it from a different direction.

I'm now away with clients for the next few days, so unlikely to respond until I return. In the meantime. others have contributed to this thread perhaps they can take up the mantle.
 

murray83

Games Collector
Local time
Today, 07:34
Joined
Mar 31, 2017
Messages
728
It is still not at all clear what you are trying to achieve - I understand the principle but not how you want it to work.

Go back to the beginning. Describe the setup (people in one office, multiple offices) all using access/not using access, etc. Then clearly describe what you want to happen

OK this is the start as suggested by CJ_London

people in multiple locations, all are using access and other office programs during the day

What I want to happen is the following -

A request is added to the database, a message is then displayed to the other users of database(if possible not the person who made the request) either msgbox or outlook style notification to show that it has been added

when the user sees the message then they open up the database and work on the request

end

cheers all hope this helps clarify the question
 

CJ_London

Super Moderator
Staff member
Local time
Today, 07:34
Joined
Feb 19, 2013
Messages
16,607
Ok So what happens if:

a) no user sees the message? or if they do, decide not to do anything about it? eg. too busy doing something else
b) more than one user tries to do something about the message?

Also clarify

A request is added to the database
how is a request added to the database? - and to give it some context a) provide an example of the sort of request being made and b) the sort of message to be displayed

when the user sees the message then they open up the database and work on the request
This implies they do not have access open all the time - true or false? In fact may not have any office application open?
 

murray83

Games Collector
Local time
Today, 07:34
Joined
Mar 31, 2017
Messages
728
OK to add a record see image named 1

and then once the request has been added it will display as shown in image name 2

the message to be shown simple one line

"New Request Added"

if the user doesn't see the message there is validation so when it waits over set time it is highlighted

yes access is always open but may not be on that database as office can have 2 or 3 different ones open
 

Attachments

  • 1.png
    1.png
    29.3 KB · Views: 170
  • 2.png
    2.png
    5 KB · Views: 173

isladogs

MVP / VIP
Local time
Today, 07:34
Joined
Jan 14, 2017
Messages
18,209
Just a few thoughts...

Could you combine various ideas suggested as this thread has evolved?

1. Use a scheduled task to open the required database hidden on all PDs when Windows starts
2. Use a timer event to check for the presence of any new records.
3. Display a message box or better still your original balloon tooltip if a new record is detected
4. After a specified time, the tooltip is hidden automatically

However, even if the above works, I still think it will annoy users after the few few minutes
I think they will all be asking for the 'feature' to be turned off!

So if you go ahead with this, I suggest you allow users the opportunity to disable it

e.g. add 'Don't show these new record notifications in future?' with a checkbox
 

CJ_London

Super Moderator
Staff member
Local time
Today, 07:34
Joined
Feb 19, 2013
Messages
16,607
You havent explained how a record is added - does a user add it manually? does it come from some automated system?

Either way if that specific access app is not open on all machines, you will need to look at installing a windows task on every machine to be run every minute/10 minutes/whatever works for you.

That task will need to identify a message and display it.

How it does it - perhaps when you save a record a text file is stored in a folder somewhere for the task routine to see it and take the appropriate action.

if the user doesn't see the message there is validation so when it waits over set time it is highlighted
is too vague to make a suggestion - what happens if they continue to ignore it. What happens when there is more than one message generated?

You have not described the process clearly enough to provide any practical help.

Don't just answer my questions, think the whole thing through and describe the full process, for all I know my suggestions are well off the mark. You know your business, I don't.
 

murray83

Games Collector
Local time
Today, 07:34
Joined
Mar 31, 2017
Messages
728
Just a few thoughts...


3. Display a message box or better still your original balloon tooltip if a new record is detected

this was my first idea but it would only display on the computer which had placed the request

if you know of the code of getting this to display on other screens that would be magic
 

isladogs

MVP / VIP
Local time
Today, 07:34
Joined
Jan 14, 2017
Messages
18,209
You would NEED to do steps 1 & 2 as well

If your db is opened (hidden) when Windows starts, a timer event can be run in that db at specified intervals to check for new records e.g. as part of an Autoexec macro

If so, step 3 is triggered on the PC for each user
 

murray83

Games Collector
Local time
Today, 07:34
Joined
Mar 31, 2017
Messages
728
i fixed it, woop

this is how following code with in form_timer

Code:
If Me.txtTimer <> Me.txtBaseRecord Then
'shows ballon tip for new record
ShowBalloonTooltip "New Move Request", "A New Request Has Been Placed", btInformation
End If

and the two txtboxes mentioned are on the form

txtBaseRecord has
Code:
=DCount([ID],"main")
in control source

which counts the number of records and then as you can see the timer runs and pop, up comes the ballon tip

cheers all for help
 

isladogs

MVP / VIP
Local time
Today, 07:34
Joined
Jan 14, 2017
Messages
18,209
Sorry to ask this but I don't see how this will trigger the balloon tooltip on anyone else's machine.
Have you tested it on other PCs both with your program open and when its not?

If it does work in both cases, perhaps you could explain what triggers it to popup

Also, have you looked at this similar thread which is listed at the bottom of this thread

https://www.access-programmers.co.uk/forums/showthread.php?t=294210

It includes some of CJ London's code and other things including an instant messenger I found on another forum
 
Last edited:

murray83

Games Collector
Local time
Today, 07:34
Joined
Mar 31, 2017
Messages
728
it works by on timer if the one box is higher than the other it popus up have also put a line of code in, for when the status is still showing as waiting it just reminds them
 

isladogs

MVP / VIP
Local time
Today, 07:34
Joined
Jan 14, 2017
Messages
18,209
Hi

Just spotted this before I log off for a while.

It would help others if you could post your final solution so we could see it working in practice
 

murray83

Games Collector
Local time
Today, 07:34
Joined
Mar 31, 2017
Messages
728
Hi

Just spotted this before I log off for a while.

It would help others if you could post your final solution so we could see it working in practice

Of course you can, see the attached example database

and thanks
 

Attachments

  • Trailer Move Request.accdb
    1.1 MB · Views: 224

isladogs

MVP / VIP
Local time
Today, 07:34
Joined
Jan 14, 2017
Messages
18,209
Hi Murray

Thanks for uploading this.
It's a very attractive form with some neat features e.g. conditional formatting based on elapsed time

However, I'm a little confused about how to use it properly

What if anything should appear in the textbox to the left of my name?

I've added several records & can confirm the popup message appears and disappears and reappears repeatedly ... (on the same PC)
I haven't checked whether it works on another PC with/without the database open. Have you checked that - especially if the db isn't open already

If I click on the popup, it goes away briefly but returns almost immediately
I would suggest it would be less obtrusive if the message didn't reappear so soon

Well done for getting it to work
However, and as I predicted, its undoubtedly clever BUT VERY irritating for the end user
Why have 2 slightly different messages?

And a few other observations as an 'end user' which you might like to consider. Adding records isn't intuitive at least to me

First I clicked on From Bay & added a number - shouldn't it be a combo?
Then I clicked on To Bay & Actioned By combos
What comes next?
If I click Confirm the above text/combos are cleared but the record isn't added unless I click Add Record.
If I click Add Record first the Actioned By value stays in place but From & To bays are cleared

Finally I expected (wrongly) that clicking a record in the datasheet part would cause it to be displayed in the single form portion so it could be edited.

Thanks for sharing - hopefully the above will be useful to you as constructive feedback
 

murray83

Games Collector
Local time
Today, 07:34
Joined
Mar 31, 2017
Messages
728
Thanks for the feedback and yes very usefull in response to some of your questions

What if anything should appear in the text box to the left of my name?

in image attached called name area is how it should look on loading

First I clicked on From Bay & added a number - shouldn't it be a combo?
Then I clicked on To Bay & Actioned By combos
What comes next?

A combo box was looked at but would of been long ( yes i know you can type ) but didn't want any text being able to inputted

next it's up to the office staff to act on the request and then either confirm its been set in motion or refuse the task

Well done for getting it to work
However, and as I predicted, its undoubtedly clever BUT VERY irritating for the end user
Why have 2 slightly different messages?

the two different messages are for when the request is placed and then in case its missed it repeats on timer until the status is not waiting, but not sure on how to set a timer inside a timer

hope this helps
 

Attachments

  • name area.png
    name area.png
    18.1 KB · Views: 174
Last edited:

isladogs

MVP / VIP
Local time
Today, 07:34
Joined
Jan 14, 2017
Messages
18,209
This is what I see



A combo box was looked at but would of been long ( yes i know you can type ) but didn't want any text being able to inputted

'Long'? Why? Is it any different to the ToBay combo?

next it's up to the office staff to act on the request and then either confirm its been set in motion or refuse the task
OK but I'd suggest you keep the items displayed in the combos / textbox till this happens in whichever order
or better still - add the record automatically

the two different messages are for when the request is placed and then in case its missed it repeats on timer until the status is not waiting, but not sure on how to set a timer inside a timer

The trouble is on my PC both events occur within a second or so of each other. One message would probably be better

Do tooltip messages have to disappear / reappear
and if that's built in, can it be slowed down?

Finally, prepare for user feedback on the lines of "how do I turn this f***ing thing off.."

Once more. Well done. I've never seen it done before & I may possibly take up the idea myself in the future.
But as I've already said, it would rapidly drive me mad.

Good luck with your project!
 

Attachments

  • Capture.jpg
    Capture.jpg
    95.2 KB · Views: 415
Last edited:

isladogs

MVP / VIP
Local time
Today, 07:34
Joined
Jan 14, 2017
Messages
18,209
Hi again

I know you've marked this solved but you might be interested in something relevant to this thread that I had mislaid.

It's a very simple message box creator that flashes for a specified number of seconds and disappears



Its not my work - done by Andy Webb as a demo for Utter Access forum
http://www.utteraccess.com/forum/index.php?showtopic=138159

For info, I've just thought of another use for your balloon tooltip idea.
I'm going to use this to popup messages for program admins when:
a) a new version is available online
b) a licence is coming up for renewal
I will post it when I've done it.
 

Attachments

  • MessageFlash.PNG
    MessageFlash.PNG
    24.9 KB · Views: 397
Last edited:

murray83

Games Collector
Local time
Today, 07:34
Joined
Mar 31, 2017
Messages
728
thanks for that looks good

and look forward to your update
 

Users who are viewing this thread

Top Bottom