Check all records...

DasT

New Member
Joined
Sep 7, 2004
Messages
29
I'e created a data entry form in which all records are input into the database, including an action date, i've managed to get this action date to bring up a message box, but only when the user comes to that particular record, which happens EVERY time that record is selected unless the action date text box is cleared, so this becomes annoying:

Code:
Private Sub Form_Current()

If db2.[Form_Company contacts1].Action_Date = Date Then
MsgBox (db2.[Form_Company contacts1].[Company Name]), vbOKOnly Or vbInformation, "An Action Date has Been Met For..."
MsgBox ("Please check this companies Action Log and clear the Action Date"), vbOKOnly Or vbExclamation, "IMPORTANT"

End If

If db2.[Form_Company contacts1].Action_Date < Date Then
MsgBox (db2.[Form_Company contacts1].[Company Name]), vbOKOnly Or vbExclamation, "An Action Date is Overdue For..."
MsgBox ("Please check this companies Action Log and CLEAR THE ACTION DATE"), vbOKOnly Or vbExclamation, "IMPORTANT"

End If

End Sub

If possible an ideal version of this would be either one that checks all records upon the form load (any code that checks all records would help ^_^) either that, or some code that checks this in real time, i.e. when it reached 3pm on October 15th the message box appears, assuming the database is open 24/7.

:rolleyes:
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,221,816
Messages
6,162,149
Members
451,746
Latest member
samwalrus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top