-----Original Message-----
I was wondering if I can have a
message created, based on a date
or any other criteria in access appli-
cation?
Access can create a text message and pop up a MsgBox to display it to the
user, as described in this excerpt from Access 97 Help:
MsgBox(prompt[, buttons] [, title] [, helpfile, context])
The MsgBox function syntax has these named arguments:
Part Description
prompt -- Required. String expression displayed as the message in the dialog
box. The maximum length of prompt is approximately 1024 characters,
depending on the width of the characters used. If prompt consists of more
than one line, you can separate the lines using a carriage return character
(Chr(13)), a linefeed character (Chr(10)), or carriage return - linefeed
character combination (Chr(13) & Chr(10)) between each line.
buttons -- Optional. Numeric expression that is the sum of values specifying
the number and type of buttons to display, the icon style to use, the
identity of the default button, and the modality of the message box. If
omitted, the default value for buttons is 0.
title -- Optional. String expression displayed in the title bar of the
dialog box. If you omit title, the application name is placed in the title
bar.
helpfile -- Optional. String expression that identifies the Help file to use
to provide context-sensitive Help for the dialog box. If helpfile is
provided, context must also be provided.
context -- Optional. Numeric expression that is the Help context number
assigned to the appropriate Help topic by the Help author. If context is
provided, helpfile must also be provided.
need to have a popup msgbox based
on the date of the last service on a peice
of equipment on one form and also be
able to update certain feilds in other
forms based on that. Please help if this
is a possibility.
Certainly it is a _possibility_. Unfortunately, your description could use
some clarification. For example:
Do you want to inform the user when they show that particular piece of
equipment in the form, or is there some other criteria? Do you want to
"update controls (not fields) in other forms", or do you want to "update
fields in particular tables that aren't the RecordSource of this form"?
If the first is true, then you can put code in the OnCurrent event to
compare the date in the record (assuming the service date is in the record
that is in the table or query that is the RecordSource for the form), create
the message, update the other tables, and pop up the MsgBox.
Now, do you expect a response from the user when the MsgBox pops up other
than just cliking OK? Would showing the same message on the form itself be
just as good (in which case, the user wouldn't have to click to acknowledge,
but if you pop up the MsgBox, it's sure to get the user's attention because
they'll have to acknowledge in order to proceed)?
If I didn't guess correctly what you want to do, please clarify.
Larry Linson
Microsoft Access MVP
.