Alert Messages & Warnings (1 Viewer)

c_selina

New member
Local time
Today, 01:07
Joined
Nov 23, 2015
Messages
8
Hello,

If someone could help me I would be very grateful.

As part of my job, I maintain a database using Access of which I have limited knowledge. Recently, there has been the need to make some changes to this database & I would like to create an alert.

How I want this alert to function is like this: there is a field where the received date of a document can be recorded. If this field is left blank, I want a message to appear somehow questioning whether this document has been received so that every time the data entry is accessed, they are reminded to check for said document. Additionally, if the date the document is received is entered into the field, I want the alert/warning to go away. This is to prevent people from doing things without having received the correct approval letters & so forth.

I have looked at some answers provided for people with similar queries but they did not appear to be quite the same & sadly, I need it explained to me in the same way a child might need something explained to them.

Again, any help would be really appreciated.

Many thanks in advance :)

Cali
 

RuralGuy

AWF VIP
Local time
Yesterday, 18:07
Joined
Jul 2, 2005
Messages
13,826
At what time did you want the *alert* to appear?
 

c_selina

New member
Local time
Today, 01:07
Joined
Nov 23, 2015
Messages
8
Until such a time as a date is entered. Thanks.
 

Minty

AWF VIP
Local time
Today, 01:07
Joined
Jul 26, 2013
Messages
10,371
I think Rural Guy meant at what point in the process does the alert need to appear.
Eg is there a form that they will look at, or scroll through records ?
 

c_selina

New member
Local time
Today, 01:07
Joined
Nov 23, 2015
Messages
8
Oops, sorry!

I would like the alert to first appear when creating a new entry.

For example, when creating an entry, if the 'TMA granted' field is left blank, an alert/message will come up every time the page is accessed saying something along the lines of 'TMA required' & then once the date the TMA form is received & recorded, the warning is no longer needed & goes away.

I hope I have made myself clear?

Cali
 

RuralGuy

AWF VIP
Local time
Yesterday, 18:07
Joined
Jul 2, 2005
Messages
13,826
You could use the Current Event of the Form to check and see if a date has been answered and alert the user if not. You could use the Before Update event to make sure the date3 has been entered and alert if not. Can you use code in Event procedures?
 

c_selina

New member
Local time
Today, 01:07
Joined
Nov 23, 2015
Messages
8
Asking me if I can use code in event procedures is akin to asking me if I can perform multiple back flips without spilling a pint whilst reciting ancient Greek. Sadly, the answer is no.
I can however, press things randomly & hope for the best! On a blank form of course. I don't want to be the one to single handedly destroy the entire database.
 

RuralGuy

AWF VIP
Local time
Yesterday, 18:07
Joined
Jul 2, 2005
Messages
13,826
Actually, I think you could do those things; not so sure about the Greek though. We can help you here if you have the patience. We'll start with the Current Event of the form. BTW, what version of Access are you using?
 

Minty

AWF VIP
Local time
Today, 01:07
Joined
Jul 26, 2013
Messages
10,371
If your database is not a split front end back simply take a copy of your database and save it locally. You can mess up the non-live copy as much as you want.

If you have linked tables in a split front end back end set up you can still "play"
Make a copy of your current front end database.
Make a copy of your live data backend - save it locally. Rename the backend database to DevBE.
Rename your FE copy to DevFE .
Now relink your DevFE to your DevBE - you now have a non live no critical copy of everything.

If your db backend is SQL Server or similar that can be a little more tricky but not impossible.
 

RuralGuy

AWF VIP
Local time
Yesterday, 18:07
Joined
Jul 2, 2005
Messages
13,826
If your database is not a split front end back simply take a copy of your database and save it locally. You can mess up the non-live copy as much as you want.

If you have linked tables in a split front end back end set up you can still "play"
Make a copy of your current front end database.
Make a copy of your live data backend - save it locally. Rename the backend database to DevBE.
Rename your FE copy to DevFE .
Now relink your DevFE to your DevBE - you now have a non live no critical copy of everything.

If your db backend is SQL Server or similar that can be a little more tricky but not impossible.
All *great* points Cali!
 

c_selina

New member
Local time
Today, 01:07
Joined
Nov 23, 2015
Messages
8
I can safely say no back flips are going to be performed any time soon & I am a very clumsy individual; I go to the bar & get back to my table wearing most of my drink!

Minty - thank you for the advice, I shall give this a try. I have already created a 'backup' copy in the event that I break something.

Something that I do have a lot of is patience (unless I am cooking, waiting for something from Amazon or walking behind slow people) so please help me, it will be greatly appreciated. I believe I am using 2010 but this will need to be checked. It's either that or 2007 though.
 

RuralGuy

AWF VIP
Local time
Yesterday, 18:07
Joined
Jul 2, 2005
Messages
13,826
Bring up the Properties sheet of the form and select the Events tab. Click of the "..." on the OnCurrent property and select code.
 

c_selina

New member
Local time
Today, 01:07
Joined
Nov 23, 2015
Messages
8
Okay, I have got as far as clicking on 'code builder', I am assuming that's the one you meant?

Sorry, I can only do this whilst I am at work so I apologise for the delays. I am not allowed to access the database from home.

Thank you again for helping me.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 01:07
Joined
Sep 12, 2006
Messages
15,656
selina

the best way might be to enlist a programmer to add the extra functionality you need, especially if you are not confident. It will cost, but it will also save your time. I am sure there are a lot of posters here who would offer their services.
 

Grumm

Registered User.
Local time
Today, 02:07
Joined
Oct 9, 2015
Messages
395
selina

the best way might be to enlist a programmer to add the extra functionality you need, especially if you are not confident. It will cost, but it will also save your time. I am sure there are a lot of posters here who would offer their services.

Or She can post a test database and someone here will do it. What she tries to do isn't really rocket science for most of us.
 

c_selina

New member
Local time
Today, 01:07
Joined
Nov 23, 2015
Messages
8
Hi Gemma-the-huskey (or Dave),

I would love to request someone's services however, I am not in a position to do so, I am merely a grunt within the organisation. We do have an IT department but I am assuming the amount of times I am shunted from person to person when requiring assistance with Access demonstrates they too have a limited wealth of knowledge.

Grumm,

I could do that, but if all else fails. I would like to learn how to do this myself so that I can be a little more self sufficient & gain a new skill at the same time.

However, if anyone has had experience with free IT courses either available within the UK or online based that explores Access, I would love to hear about it. You can never had too many transferable skills in today's job market!
 

RuralGuy

AWF VIP
Local time
Yesterday, 18:07
Joined
Jul 2, 2005
Messages
13,826
Okay, I have got as far as clicking on 'code builder', I am assuming that's the one you meant?

Sorry, I can only do this whilst I am at work so I apologise for the delays. I am not allowed to access the database from home.

Thank you again for helping me.
Now you should have a stub of code like:
Code:
Private Sub Form_Current()

End Sub
...when your done it should look something like:
Code:
Private Sub Form_Current()

If Not IsDate(Me.YourTMADateControlName) Then
   MsgBox "TMA Reguired!", vbCritical
End If

End Sub
...using the name of YourTMADateControlName of course.
 

RuralGuy

AWF VIP
Local time
Yesterday, 18:07
Joined
Jul 2, 2005
Messages
13,826
Once we get anything working we can then change it to do what you want.
 

c_selina

New member
Local time
Today, 01:07
Joined
Nov 23, 2015
Messages
8
Okay, I don't think I have done this right.

To get to the property sheet, I had to click on design view. After that, it brought up the option to go to the event tab as before but instead of having 'OnCurrent' it had TMA granted so I think I must have pressed something wrong.

I carried on anyway to have a bit of a play & click on the ... which brought up the code like you said it should & it looked like what you had posted. At the top of the pop up box however there are two drop down menus? This I think is what I changed as that says 'TMA granted' too. But, on the second drop down menu, I selected 'BeforeUpdate' as you said about it before & it sounded like the most accurate. Then I just typed in the 'MsgBox "TMA REQUIRED", & also added vbCritical.

I am not sure if anything has changed though? You should be able to see what I have done from this screen shot:
DB Screenshot.png
 

RuralGuy

AWF VIP
Local time
Yesterday, 18:07
Joined
Jul 2, 2005
Messages
13,826
Well what you have will throw an error when it compiles. Let's not have anything in the BeforeUpdate event just yet. Go baaaack and review my post #17 again and get that working. What name do you have for your TMA Date control?
 

Users who are viewing this thread

Top Bottom