MsgBox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In my order form I have two fields that I want to make sure they contain a
value.
one is a textbox which holds the invoice number and the other is a combo.
how can I have a personal MsgBox for each of these if there is no value in
them.
I'm not sure what to do.
Here is what I have.


Private Sub Form_Current()
If IsNull(Me![Invoice#]) Then
DoCmd.GoToControl "Invoice#"
MsgBox "You Must Enter A Unique Invoice# To This Order!"
End If
IsNull (Me![Combo69])
DoCmd.GoToControl "Combo69"
MsgBox "You Must Select A Dealer Type in Price Levels For This
Order", vbOK + vbExclamation
End If
End Sub

Thank you in advance for any help on this subject
 
Hi Alvin,

I recommend using the Form_BeforeUpdate event procedure, rather than the
Form_Current event procedure. Form_BeforeUpdate will only fire when a change
has been made to the data (ie. the form is dirty). Form_Current fires every
time you change records, whether you've made any changes to the data or not.

I also recommend renaming the Invoice# field to something like InvoiceNo.
You should avoid the use of special characters (#, spaces, etc.) in the names
of fields, objects (tables, queries, forms, reports, etc.) or the names of
controls on forms and reports. See the following KB article:

Special characters that you must avoid when you work with Access databases
http://support.microsoft.com/?id=826763

Now is a good time to rename Combo69 as well. Give it a name that makes
sense, such as cboDealerType. Name the textbox that displays the InvoiceNo
something like txtInvoiceNo. With those changes in place, you can then use
the following code:

Option Compare Database
Option Explicit

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo ProcError

If IsNull(txtInvoiceNo) Then
MsgBox "Please Enter an Invoice Number.", _
vbCritical, "Missing Required Value..."
txtInvoiceNo.SetFocus
Cancel = True
Exit Sub
End If

If IsNull(cboDealerType) Then
MsgBox "Please Select a Dealer Type.", _
vbCritical, "Missing Required Value..."
cboDealerType.SetFocus
Cancel = True
Exit Sub
End If

ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, , _
"Error in Form_BeforeUpdate event procedure..."
Resume ExitProc
End Sub




Tom
____________________________________________

:

In my order form I have two fields that I want to make sure they contain a
value.
one is a textbox which holds the invoice number and the other is a combo.
how can I have a personal MsgBox for each of these if there is no value in
them.
I'm not sure what to do.
Here is what I have.


Private Sub Form_Current()
If IsNull(Me![Invoice#]) Then
DoCmd.GoToControl "Invoice#"
MsgBox "You Must Enter A Unique Invoice# To This Order!"
End If
IsNull (Me![Combo69])
DoCmd.GoToControl "Combo69"
MsgBox "You Must Select A Dealer Type in Price Levels For This
Order", vbOK + vbExclamation
End If
End Sub

Thank you in advance for any help on this subject
 
Thank you Tom
It is very close and I did rename the fields just like you suggested.
Now when I open the order form it says;
"Microsoft can't move the focus to Controle OrderID"
I'm not sure how to fix this or if it really needs to be fixed. I know that
we have now added some more focus for "txtInvoiceNo" & "cboDealer Type" and
they may be conflicting.
Thank you so much for the help!
Alvin
 
Alvin,

First of all try to find where the attempt to move the focus to OrderID
is coming from. The new procedure you have made on the form's Before
Update event shouldn't have an effect on this, because this event will
not be relevant at the point where you are opening the form. Do you
have any macro or VBA code on the form's Open or Load or Current events,
which includes a line like...
Me.OrderID.SetFocus
....or...
DoCmd.GoToControl Me.OrderID
Assuming you can find the relevant code, you then need to find why it
won't work. Is there a control named OrderID on the form? If so, is
its Enabled property set to No?
In any case, you might need to also figure out the purpose of moving the
focus to that control... maybe the reason for this is no longer valid in
view of the other changes you have made to the form, so the code can be
removed.
 
Hi Alvin,
Now when I open the order form it says;
"Microsoft can't move the focus to Controle OrderID"
I'm not sure how to fix this or if it really needs to be fixed.

I'd certainly want to fix it. You, or your users, should not be satisfied
having to view such an error message every time you open the form. Check your
VBA code for any references to OrderID, by using the find feature (Edit >
Find...). If you still cannot find it, then try using Tools > Analyze >
Documenter. Pick just the form in question. Click on the Option... button
and place checks in the top three boxes. Select the option button that reads
"Names and Properties". Click on OK two times to run the report. Without
closing the report, choose File > Export. Export the report as a rich text
document (*.RTF). You can then open this file in Word and search for OrderID.
I know that we have now added some more focus for "txtInvoiceNo" &
"cboDealer Type" and they may be conflicting.

I don't think you should have any conflicts here. However, did you rename
Combo69 to "cboDealer Type" or "cboDealerType"? I recommended no spaces in
the names of controls earlier.

Tom
____________________________________________

:

Thank you Tom
It is very close and I did rename the fields just like you suggested.
Now when I open the order form it says;
"Microsoft can't move the focus to Controle OrderID"
I'm not sure how to fix this or if it really needs to be fixed. I know that
we have now added some more focus for "txtInvoiceNo" & "cboDealer Type" and
they may be conflicting.
Thank you so much for the help!
Alvin

____________________________________________

:

Hi Alvin,

I recommend using the Form_BeforeUpdate event procedure, rather than the
Form_Current event procedure. Form_BeforeUpdate will only fire when a change
has been made to the data (ie. the form is dirty). Form_Current fires every
time you change records, whether you've made any changes to the data or not.

I also recommend renaming the Invoice# field to something like InvoiceNo.
You should avoid the use of special characters (#, spaces, etc.) in the names
of fields, objects (tables, queries, forms, reports, etc.) or the names of
controls on forms and reports. See the following KB article:

Special characters that you must avoid when you work with Access databases
http://support.microsoft.com/?id=826763

Now is a good time to rename Combo69 as well. Give it a name that makes
sense, such as cboDealerType. Name the textbox that displays the InvoiceNo
something like txtInvoiceNo. With those changes in place, you can then use
the following code:

Option Compare Database
Option Explicit

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo ProcError

If IsNull(txtInvoiceNo) Then
MsgBox "Please Enter an Invoice Number.", _
vbCritical, "Missing Required Value..."
txtInvoiceNo.SetFocus
Cancel = True
Exit Sub
End If

If IsNull(cboDealerType) Then
MsgBox "Please Select a Dealer Type.", _
vbCritical, "Missing Required Value..."
cboDealerType.SetFocus
Cancel = True
Exit Sub
End If

ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, , _
"Error in Form_BeforeUpdate event procedure..."
Resume ExitProc
End Sub




Tom
____________________________________________

:

In my order form I have two fields that I want to make sure they contain a
value.
one is a textbox which holds the invoice number and the other is a combo.
how can I have a personal MsgBox for each of these if there is no value in
them.
I'm not sure what to do.
Here is what I have.


Private Sub Form_Current()
If IsNull(Me![Invoice#]) Then
DoCmd.GoToControl "Invoice#"
MsgBox "You Must Enter A Unique Invoice# To This Order!"
End If
IsNull (Me![Combo69])
DoCmd.GoToControl "Combo69"
MsgBox "You Must Select A Dealer Type in Price Levels For This
Order", vbOK + vbExclamation
End If
End Sub

Thank you in advance for any help on this subject
 
I have renamed Dealer Type to "DealerType"
Now I get error 2465 in form activate. It says it can't find the field '|'
Referred to in your expression. The title is
Error in Form_Activate Event Procedure.
I followed your instructions but no luck yet.
Here is my Form activate code:

Private Sub Form_Activate()
On Error GoTo Err_Form_Activate
Me.Requery
If IsLoaded("Orders by Customer") Then
If Forms![Orders by Customer]![Orders by Customer
Subform].Form.RecordsetClone.RecordCount > 0 Then
DoCmd.GoToControl "OrderID"
DoCmd.FindRecord Forms![Orders by Customer]![Orders by Customer
Subform].Form![OrderID]
End If
End If

Exit_Form_Activate:
Exit Sub

Err_Form_Activate:
MsgBox "Error " & Err.Number & ": " & Err.Description, , _
"Error in Form_Activate event procedure..."
Resume Exit_Form_Activate
End Sub


Thank you so much for your help!!
Alvin



Tom Wickerath said:
Hi Alvin,
Now when I open the order form it says;
"Microsoft can't move the focus to Controle OrderID"
I'm not sure how to fix this or if it really needs to be fixed.

I'd certainly want to fix it. You, or your users, should not be satisfied
having to view such an error message every time you open the form. Check your
VBA code for any references to OrderID, by using the find feature (Edit >
Find...). If you still cannot find it, then try using Tools > Analyze >
Documenter. Pick just the form in question. Click on the Option... button
and place checks in the top three boxes. Select the option button that reads
"Names and Properties". Click on OK two times to run the report. Without
closing the report, choose File > Export. Export the report as a rich text
document (*.RTF). You can then open this file in Word and search for OrderID.
I know that we have now added some more focus for "txtInvoiceNo" &
"cboDealer Type" and they may be conflicting.

I don't think you should have any conflicts here. However, did you rename
Combo69 to "cboDealer Type" or "cboDealerType"? I recommended no spaces in
the names of controls earlier.

Tom
____________________________________________

:

Thank you Tom
It is very close and I did rename the fields just like you suggested.
Now when I open the order form it says;
"Microsoft can't move the focus to Controle OrderID"
I'm not sure how to fix this or if it really needs to be fixed. I know that
we have now added some more focus for "txtInvoiceNo" & "cboDealer Type" and
they may be conflicting.
Thank you so much for the help!
Alvin

____________________________________________

:

Hi Alvin,

I recommend using the Form_BeforeUpdate event procedure, rather than the
Form_Current event procedure. Form_BeforeUpdate will only fire when a change
has been made to the data (ie. the form is dirty). Form_Current fires every
time you change records, whether you've made any changes to the data or not.

I also recommend renaming the Invoice# field to something like InvoiceNo.
You should avoid the use of special characters (#, spaces, etc.) in the names
of fields, objects (tables, queries, forms, reports, etc.) or the names of
controls on forms and reports. See the following KB article:

Special characters that you must avoid when you work with Access databases
http://support.microsoft.com/?id=826763

Now is a good time to rename Combo69 as well. Give it a name that makes
sense, such as cboDealerType. Name the textbox that displays the InvoiceNo
something like txtInvoiceNo. With those changes in place, you can then use
the following code:

Option Compare Database
Option Explicit

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo ProcError

If IsNull(txtInvoiceNo) Then
MsgBox "Please Enter an Invoice Number.", _
vbCritical, "Missing Required Value..."
txtInvoiceNo.SetFocus
Cancel = True
Exit Sub
End If

If IsNull(cboDealerType) Then
MsgBox "Please Select a Dealer Type.", _
vbCritical, "Missing Required Value..."
cboDealerType.SetFocus
Cancel = True
Exit Sub
End If

ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, , _
"Error in Form_BeforeUpdate event procedure..."
Resume ExitProc
End Sub




Tom
____________________________________________

:

In my order form I have two fields that I want to make sure they contain a
value.
one is a textbox which holds the invoice number and the other is a combo.
how can I have a personal MsgBox for each of these if there is no value in
them.
I'm not sure what to do.
Here is what I have.


Private Sub Form_Current()
If IsNull(Me![Invoice#]) Then
DoCmd.GoToControl "Invoice#"
MsgBox "You Must Enter A Unique Invoice# To This Order!"
End If
IsNull (Me![Combo69])
DoCmd.GoToControl "Combo69"
MsgBox "You Must Select A Dealer Type in Price Levels For This
Order", vbOK + vbExclamation
End If
End Sub

Thank you in advance for any help on this subject
 
I Found It. I got to thinking it only happens when I have an order already
and I click a command button to open the form to find specific info. I
accidently refferenced CustomerID with OrderID. Thak you all.
Only one more small bug and I'll be done.
I have a MsgBox that prompts for Invoice# and one for DealerType. The only
problem is if I click Exit it will promt me but instead of keeping the form
open it closes when I click Ok.

Here is what I have;

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo ProcError

If IsNull(txtInvoiceNo) Then
MsgBox "Please Enter an Invoice Number.", _
vbExclamation, "Invoice Number"
txtInvoiceNo.SetFocus
Cancel = True
Exit Sub
End If

If IsNull(cboDealerType) Then
MsgBox "Please Select a Dealer Type.", _
vbExclamation, "Must Choose Dealer Type"
cboDealerType.SetFocus
Cancel = True
Exit Sub
End If

ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, , _
"Error in Form_BeforeUpdate event procedure..."
Resume ExitProc
End Sub



Tom Wickerath said:
Hi Alvin,
Now when I open the order form it says;
"Microsoft can't move the focus to Controle OrderID"
I'm not sure how to fix this or if it really needs to be fixed.

I'd certainly want to fix it. You, or your users, should not be satisfied
having to view such an error message every time you open the form. Check your
VBA code for any references to OrderID, by using the find feature (Edit >
Find...). If you still cannot find it, then try using Tools > Analyze >
Documenter. Pick just the form in question. Click on the Option... button
and place checks in the top three boxes. Select the option button that reads
"Names and Properties". Click on OK two times to run the report. Without
closing the report, choose File > Export. Export the report as a rich text
document (*.RTF). You can then open this file in Word and search for OrderID.
I know that we have now added some more focus for "txtInvoiceNo" &
"cboDealer Type" and they may be conflicting.

I don't think you should have any conflicts here. However, did you rename
Combo69 to "cboDealer Type" or "cboDealerType"? I recommended no spaces in
the names of controls earlier.

Tom
____________________________________________

:

Thank you Tom
It is very close and I did rename the fields just like you suggested.
Now when I open the order form it says;
"Microsoft can't move the focus to Controle OrderID"
I'm not sure how to fix this or if it really needs to be fixed. I know that
we have now added some more focus for "txtInvoiceNo" & "cboDealer Type" and
they may be conflicting.
Thank you so much for the help!
Alvin

____________________________________________

:

Hi Alvin,

I recommend using the Form_BeforeUpdate event procedure, rather than the
Form_Current event procedure. Form_BeforeUpdate will only fire when a change
has been made to the data (ie. the form is dirty). Form_Current fires every
time you change records, whether you've made any changes to the data or not.

I also recommend renaming the Invoice# field to something like InvoiceNo.
You should avoid the use of special characters (#, spaces, etc.) in the names
of fields, objects (tables, queries, forms, reports, etc.) or the names of
controls on forms and reports. See the following KB article:

Special characters that you must avoid when you work with Access databases
http://support.microsoft.com/?id=826763

Now is a good time to rename Combo69 as well. Give it a name that makes
sense, such as cboDealerType. Name the textbox that displays the InvoiceNo
something like txtInvoiceNo. With those changes in place, you can then use
the following code:

Option Compare Database
Option Explicit

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo ProcError

If IsNull(txtInvoiceNo) Then
MsgBox "Please Enter an Invoice Number.", _
vbCritical, "Missing Required Value..."
txtInvoiceNo.SetFocus
Cancel = True
Exit Sub
End If

If IsNull(cboDealerType) Then
MsgBox "Please Select a Dealer Type.", _
vbCritical, "Missing Required Value..."
cboDealerType.SetFocus
Cancel = True
Exit Sub
End If

ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, , _
"Error in Form_BeforeUpdate event procedure..."
Resume ExitProc
End Sub




Tom
____________________________________________

:

In my order form I have two fields that I want to make sure they contain a
value.
one is a textbox which holds the invoice number and the other is a combo.
how can I have a personal MsgBox for each of these if there is no value in
them.
I'm not sure what to do.
Here is what I have.


Private Sub Form_Current()
If IsNull(Me![Invoice#]) Then
DoCmd.GoToControl "Invoice#"
MsgBox "You Must Enter A Unique Invoice# To This Order!"
End If
IsNull (Me![Combo69])
DoCmd.GoToControl "Combo69"
MsgBox "You Must Select A Dealer Type in Price Levels For This
Order", vbOK + vbExclamation
End If
End Sub

Thank you in advance for any help on this subject
 
Hi Alvin,
I have renamed Dealer Type to "DealerType"

I thought your Dealer type control was a combo box(?). Rename it to
"cboDealerType" if you want to follow standard naming conventions.
Now I get error 2465 in form activate. It says it can't find the field '|'
Referred to in your expression.

Notice that your Form_Activate procedure includes the following line of code:

DoCmd.GoToControl "OrderID"

However, you have since renamed this control (I think) to txtOrderNo.

As MacDermott said in your follow-on post, titled "Re: error 2465 in
Form_Activate event Procedure", perhaps you could tell us what this code is
supposed to achieve?


Tom
____________________________________________

:

I have renamed Dealer Type to "DealerType"
Now I get error 2465 in form activate. It says it can't find the field '|'
Referred to in your expression. The title is Error in Form_Activate Event
Procedure.
I followed your instructions but no luck yet.

Here is my Form activate code:

Private Sub Form_Activate()
On Error GoTo Err_Form_Activate
Me.Requery
If IsLoaded("Orders by Customer") Then
If Forms![Orders by Customer]![Orders by Customer
Subform].Form.RecordsetClone.RecordCount > 0 Then
DoCmd.GoToControl "OrderID"
DoCmd.FindRecord Forms![Orders by Customer]![Orders by Customer
Subform].Form![OrderID]
End If
End If

Exit_Form_Activate:
Exit Sub

Err_Form_Activate:
MsgBox "Error " & Err.Number & ": " & Err.Description, , _
"Error in Form_Activate event procedure..."
Resume Exit_Form_Activate
End Sub


Thank you so much for your help!!
Alvin

____________________________________________

:

Hi Alvin,
Now when I open the order form it says;
"Microsoft can't move the focus to Controle OrderID"
I'm not sure how to fix this or if it really needs to be fixed.

I'd certainly want to fix it. You, or your users, should not be satisfied
having to view such an error message every time you open the form. Check your
VBA code for any references to OrderID, by using the find feature (Edit >
Find...). If you still cannot find it, then try using Tools > Analyze >
Documenter. Pick just the form in question. Click on the Option... button
and place checks in the top three boxes. Select the option button that reads
"Names and Properties". Click on OK two times to run the report. Without
closing the report, choose File > Export. Export the report as a rich text
document (*.RTF). You can then open this file in Word and search for OrderID.
I know that we have now added some more focus for "txtInvoiceNo" &
"cboDealer Type" and they may be conflicting.

I don't think you should have any conflicts here. However, did you rename
Combo69 to "cboDealer Type" or "cboDealerType"? I recommended no spaces in
the names of controls earlier.

Tom
____________________________________________

:

Thank you Tom
It is very close and I did rename the fields just like you suggested.
Now when I open the order form it says;
"Microsoft can't move the focus to Controle OrderID"
I'm not sure how to fix this or if it really needs to be fixed. I know that
we have now added some more focus for "txtInvoiceNo" & "cboDealer Type" and
they may be conflicting.
Thank you so much for the help!
Alvin

____________________________________________

:

Hi Alvin,

I recommend using the Form_BeforeUpdate event procedure, rather than the
Form_Current event procedure. Form_BeforeUpdate will only fire when a change
has been made to the data (ie. the form is dirty). Form_Current fires every
time you change records, whether you've made any changes to the data or not.

I also recommend renaming the Invoice# field to something like InvoiceNo.
You should avoid the use of special characters (#, spaces, etc.) in the names
of fields, objects (tables, queries, forms, reports, etc.) or the names of
controls on forms and reports. See the following KB article:

Special characters that you must avoid when you work with Access databases
http://support.microsoft.com/?id=826763

Now is a good time to rename Combo69 as well. Give it a name that makes
sense, such as cboDealerType. Name the textbox that displays the InvoiceNo
something like txtInvoiceNo. With those changes in place, you can then use
the following code:

Option Compare Database
Option Explicit

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo ProcError

If IsNull(txtInvoiceNo) Then
MsgBox "Please Enter an Invoice Number.", _
vbCritical, "Missing Required Value..."
txtInvoiceNo.SetFocus
Cancel = True
Exit Sub
End If

If IsNull(cboDealerType) Then
MsgBox "Please Select a Dealer Type.", _
vbCritical, "Missing Required Value..."
cboDealerType.SetFocus
Cancel = True
Exit Sub
End If

ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, , _
"Error in Form_BeforeUpdate event procedure..."
Resume ExitProc
End Sub




Tom
____________________________________________

:

In my order form I have two fields that I want to make sure they contain a
value.
one is a textbox which holds the invoice number and the other is a combo.
how can I have a personal MsgBox for each of these if there is no value in
them.
I'm not sure what to do.
Here is what I have.


Private Sub Form_Current()
If IsNull(Me![Invoice#]) Then
DoCmd.GoToControl "Invoice#"
MsgBox "You Must Enter A Unique Invoice# To This Order!"
End If
IsNull (Me![Combo69])
DoCmd.GoToControl "Combo69"
MsgBox "You Must Select A Dealer Type in Price Levels For This
Order", vbOK + vbExclamation
End If
End Sub

Thank you in advance for any help on this subject
 
Hello,

I have a similar problem as what was posted. I have a form named "unit
data" and I want to a msg box to appear when opened. The msg box will be
activated if the date in MRI EDD is past due - msg "action required". Please
provide with step by step instructions.

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo ProcError

If ([MRI_EDD] > Date) Then
MsgBox "Action Required", _
vbCritical, "Update Information..."
txtInvoiceNo.SetFocus
Cancel = True
Exit Sub
 
Hi Rod,

You do not appear to have a similar problem. The original poster, Alvin,
wanted to make certain that two controls contained a value, before allowing
the record to be saved. On the other hand, you want a message box that
activates in a given condition.

My suggestion is to repost your question as a brand new thread. Be very
specific--include any error numbers and messages that you are receiving. Tell
us what version of Access you are using, and what service pack is installed.
What is the datatype for the MRI EDD field? Also, why not just use
conditional formatting to change a color, if this condition is met?

Tom
_________________________________________

:

Hello,

I have a similar problem as what was posted. I have a form named "unit
data" and I want to a msg box to appear when opened. The msg box will be
activated if the date in MRI EDD is past due - msg "action required". Please
provide with step by step instructions.

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo ProcError

If ([MRI_EDD] > Date) Then
MsgBox "Action Required", _
vbCritical, "Update Information..."
txtInvoiceNo.SetFocus
Cancel = True
Exit Sub
 
Tom,

I have tried to post as a new thread. When I click on new nothing happens.

I am using Microsoft Access 2000 SR-1 Professional. As for errors - there
is none.

I have created a command button to open a form (unit data) using a macro -
this part works. When command button is excuted a pop up box (msg box) will
appear with a message "action Required".

MRI EDD field is a date.

I have used the Msgbox action, but there doesn't seem to be a fuction to tie
it to the MRI EDD field.

Rod
 
Hi Rod,

Sorry to hear that you are having trouble posting a new thread. What
application are you using as your newsreader (ie. the Microsoft web portal,
Outlook Express, or some other newsreader?).
I am using Microsoft Access 2000 SR-1 Professional.
Then you need to immediately, and without any further delay, download
service packs 2 and 3 for Office 2000 and install them. You should also
update the JET database engine to the latest service pack, and update your
operating system as well. Use this article to get started:

How to keep a Jet 4.0 database in top working condition
http://support.microsoft.com/?id=303528

I have used the Msgbox action, but there doesn't seem to be a fuction to tie
it to the MRI EDD field.

You need to use VBA code, just like you indicated in your initial post, but
not as a part of the Form's Before_Update event procedure. Does your unit
data form open with just a single record in it's recordset? Or, once this
form is open, is the user allowed to use navigation buttons to scroll through
a series of records?

Tom
_________________________________________

:

Tom,

I have tried to post as a new thread. When I click on new nothing happens.

I am using Microsoft Access 2000 SR-1 Professional. As for errors - there
is none.

I have created a command button to open a form (unit data) using a macro -
this part works. When command button is excuted a pop up box (msg box) will
appear with a message "action Required".

MRI EDD field is a date.

I have used the Msgbox action, but there doesn't seem to be a fuction to tie
it to the MRI EDD field.

Rod
_________________________________________

:

Hi Rod,

You do not appear to have a similar problem. The original poster, Alvin,
wanted to make certain that two controls contained a value, before allowing
the record to be saved. On the other hand, you want a message box that
activates in a given condition.

My suggestion is to repost your question as a brand new thread. Be very
specific--include any error numbers and messages that you are receiving. Tell
us what version of Access you are using, and what service pack is installed.
What is the datatype for the MRI EDD field? Also, why not just use
conditional formatting to change a color, if this condition is met?

Tom
_________________________________________

:

Hello,

I have a similar problem as what was posted. I have a form named "unit
data" and I want to a msg box to appear when opened. The msg box will be
activated if the date in MRI EDD is past due - msg "action required". Please
provide with step by step instructions.

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo ProcError

If ([MRI_EDD] > Date) Then
MsgBox "Action Required", _
vbCritical, "Update Information..."
txtInvoiceNo.SetFocus
Cancel = True
Exit Sub
 
From what I've heard, you need to allow pop-ups in order to post new
questions using the Microsoft web interface.

Far better to use a proper newsreader such as Outlook Express or Forte Agent
rather than the web interface!

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Rod said:
Tom,

I have tried to post as a new thread. When I click on new nothing happens.

I am using Microsoft Access 2000 SR-1 Professional. As for errors - there
is none.

I have created a command button to open a form (unit data) using a macro -
this part works. When command button is excuted a pop up box (msg box) will
appear with a message "action Required".

MRI EDD field is a date.

I have used the Msgbox action, but there doesn't seem to be a fuction to tie
it to the MRI EDD field.

Rod

Tom Wickerath said:
Hi Rod,

You do not appear to have a similar problem. The original poster, Alvin,
wanted to make certain that two controls contained a value, before allowing
the record to be saved. On the other hand, you want a message box that
activates in a given condition.

My suggestion is to repost your question as a brand new thread. Be very
specific--include any error numbers and messages that you are receiving. Tell
us what version of Access you are using, and what service pack is installed.
What is the datatype for the MRI EDD field? Also, why not just use
conditional formatting to change a color, if this condition is met?

Tom
_________________________________________

:

Hello,

I have a similar problem as what was posted. I have a form named "unit
data" and I want to a msg box to appear when opened. The msg box will be
activated if the date in MRI EDD is past due - msg "action required". Please
provide with step by step instructions.

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo ProcError

If ([MRI_EDD] > Date) Then
MsgBox "Action Required", _
vbCritical, "Update Information..."
txtInvoiceNo.SetFocus
Cancel = True
Exit Sub
 
I am having technical difficulties with my business computer - firewall. Can
my initial question be posted for assistance. Thanks Rod

I have created a command button to open a form (unit data) using a macro -
this part works. When the command button is excuted - I would like a pop up
box (msg box) to appear with a message "action Required".

MRI EDD field is a date.

I have used the Msgbox action, but there doesn't seem to be a fuction to tie
it to the MRI EDD field.

Rod



Douglas J Steele said:
From what I've heard, you need to allow pop-ups in order to post new
questions using the Microsoft web interface.

Far better to use a proper newsreader such as Outlook Express or Forte Agent
rather than the web interface!

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Rod said:
Tom,

I have tried to post as a new thread. When I click on new nothing happens.

I am using Microsoft Access 2000 SR-1 Professional. As for errors - there
is none.

I have created a command button to open a form (unit data) using a macro -
this part works. When command button is excuted a pop up box (msg box) will
appear with a message "action Required".

MRI EDD field is a date.

I have used the Msgbox action, but there doesn't seem to be a fuction to tie
it to the MRI EDD field.

Rod

Tom Wickerath said:
Hi Rod,

You do not appear to have a similar problem. The original poster, Alvin,
wanted to make certain that two controls contained a value, before allowing
the record to be saved. On the other hand, you want a message box that
activates in a given condition.

My suggestion is to repost your question as a brand new thread. Be very
specific--include any error numbers and messages that you are receiving. Tell
us what version of Access you are using, and what service pack is installed.
What is the datatype for the MRI EDD field? Also, why not just use
conditional formatting to change a color, if this condition is met?

Tom
_________________________________________

:

Hello,

I have a similar problem as what was posted. I have a form named "unit
data" and I want to a msg box to appear when opened. The msg box will be
activated if the date in MRI EDD is past due - msg "action required". Please
provide with step by step instructions.

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo ProcError

If ([MRI_EDD] > Date) Then
MsgBox "Action Required", _
vbCritical, "Update Information..."
txtInvoiceNo.SetFocus
Cancel = True
Exit Sub
 
Hi Rod,

Perhaps you should try posting questions from home, if you are not able to
do so from work. I tried to answer your question on 8/25, but I needed more
information first. I asked a question in return, which you have not answered
yet. My earlier question to you was this:

"Does your unit data form open with just a single record in it's recordset?
Or, once this form is open, is the user allowed to use navigation buttons to
scroll through
a series of records?"


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

I am having technical difficulties with my business computer - firewall. Can
my initial question be posted for assistance. Thanks Rod

I have created a command button to open a form (unit data) using a macro -
this part works. When the command button is excuted - I would like a pop up
box (msg box) to appear with a message "action Required".

MRI EDD field is a date.

I have used the Msgbox action, but there doesn't seem to be a fuction to tie
it to the MRI EDD field.

Rod
 
Tom,

Thanks for responding. I guess I got caught up trying to post a new thread
that I forgot your initial question. Yes, the data form is allowed to
navigate scroll through a serries of records.

Rod
 
Hi Rod,

Tell you what....can you send me a private e-mail message that has a valid
return address? I will work up a couple of samples and send them to you.
It's already too late for me to spend any time on this right now.


Tom

QWaos168@XScom cast. Dnet (<--Remove all capitalized letters and spaces).
__________________________________________

:

Tom,

Thanks for responding. I guess I got caught up trying to post a new thread
that I forgot your initial question. Yes, the data form is allowed to
navigate scroll through a serries of records.

Rod
 
Back
Top