Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / July 2007

Tip: Looking for answers? Try searching our database.

Message box on opening a record under certain conditions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CW - 06 Jul 2007 15:38 GMT
When a record is opened (i.e. when a particular ref number is chosen from the
dropdown and the relevant form opens) we need to have a reminder message if
certain data has not been entered yet.
For example, if the Insurance Value control is empty, there should be a
popup box saying "Check Insurance!".
I have tried various things but no good yet, so help would be very welcome!
Many thanks
CW
SusanV - 06 Jul 2007 16:01 GMT
Form's OnOpen event:

If Nz(Me.Yourtextbox,"") = "" Then
   msgbox "Whatever you need to say"
End If
Signature

hth,
SusanV

> When a record is opened (i.e. when a particular ref number is chosen from
> the
[quoted text clipped - 7 lines]
> Many thanks
> CW
CW - 06 Jul 2007 20:36 GMT
Susan -
Thanks, but that works only when first opening the form, upon which it shows
the first of my records by default. When I then select the record I want to
go to (by selecting its reference in a combo dropdown), even if the
particular field is empty, that code doesn't work.
Close, but not there yet!!
Hope you can come up with the extra bit to achieve this
Many thanks
CW

> Form's OnOpen event:
>
[quoted text clipped - 12 lines]
> > Many thanks
> > CW
Bob Quintal - 06 Jul 2007 21:05 GMT
> Susan -
> Thanks, but that works only when first opening the form, upon
[quoted text clipped - 5 lines]
> Many thanks
> CW

Just move the code to the OnCurrent event. This will trigger
whenever a different record is selected.
If the form is also used to enter new records, you will want to
put a
If Not me.newrec then above the code block, with the End If
below.


>> Form's OnOpen event:
>>
[quoted text clipped - 12 lines]
>> > Many thanks
>> > CW

Signature

Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Carl Rapson - 06 Jul 2007 16:05 GMT
> When a record is opened (i.e. when a particular ref number is chosen from
> the
[quoted text clipped - 7 lines]
> Many thanks
> CW

The form's Current event fires whenever a record is loaded. You could put
code into that event to check the values in certain fields and display
messages if they are blank (or whatever).

Carl Rapson
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.