If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Repost of Checkbox Help
Hi,
Here's the scenario: I have a form that has a checkbox (Group Notified). When I check this box, I want three things to happen: (1) My RunEmail macro to run, (2) GroupNotified Date textbox to populate with the Date the checkbox was clicked, and (3) GroupNotified Time textbox to populate with the Time the checkbox was clicked. If the Checkbox is not clicked, or is removed, I want the Date/Time to remain/become blank and the email NOT to run. Right now, my RunEmail code works fine by itself, but the Call statement doesn't work and I keep getting funny error messages (i.e. Error 91, Set Statement Required, etc...)... Any suggestions??? Thank you very much....... Chris |
#2
|
|||
|
|||
Repost of Checkbox Help
Not sure which part of your code is causing the error. Sounds like the
email part works, so I will address the other issues. In the BeforeUpdate event of your form put something like... -------------------------------------------------------- Private Sub Form_BeforeUpdate(Cancel As Integer) If Me.Dirty Then If [GroupNotified]=True Then [GroupNotifiedDate] = Date() [GroupNotifiedTime] = Time() Else [GroupNotifiedDate] = "" [GroupNotifiedTime] = "" End If End Sub -------------------------------------------------------- RickB "ChrisBat" wrote in message ... Hi, Here's the scenario: I have a form that has a checkbox (Group Notified). When I check this box, I want three things to happen: (1) My RunEmail macro to run, (2) GroupNotified Date textbox to populate with the Date the checkbox was clicked, and (3) GroupNotified Time textbox to populate with the Time the checkbox was clicked. If the Checkbox is not clicked, or is removed, I want the Date/Time to remain/become blank and the email NOT to run. Right now, my RunEmail code works fine by itself, but the Call statement doesn't work and I keep getting funny error messages (i.e. Error 91, Set Statement Required, etc...)... Any suggestions??? Thank you very much....... Chris |
#3
|
|||
|
|||
Repost of Checkbox Help
On Tue, 29 Jun 2004 06:06:12 -0700, "ChrisBat"
wrote: Any suggestions??? I'd suggest that you post the code (or the macro steps) that you are using. Clearly there is something wrong with the code, but since we cannot see it, it's more than a bit difficult to figure out what! John W. Vinson[MVP] Come for live chats every Tuesday and Thursday http://go.compuserve.com/msdevapps?loc=us&access=public |
#4
|
|||
|
|||
Repost of Checkbox Help
Actually, the reply from Rick B answered the question - I
didn't know about the If Me.Dirty function, and the rest of his reply was the same as my code - the Dirty function works. (Anybody know if there is a Me.Spank function? :-)....) Thanks again, Chris -----Original Message----- On Tue, 29 Jun 2004 06:06:12 -0700, "ChrisBat" wrote: Any suggestions??? I'd suggest that you post the code (or the macro steps) that you are using. Clearly there is something wrong with the code, but since we cannot see it, it's more than a bit difficult to figure out what! John W. Vinson[MVP] Come for live chats every Tuesday and Thursday http://go.compuserve.com/msdevapps?loc=us&access=public . |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
subform checkbox | bryan | New Users | 1 | June 17th, 2004 05:18 PM |
Purpose of the PRIVATE checkbox? | Paul S. Natanson | Contacts | 3 | June 14th, 2004 08:01 PM |
Any reason why a checkbox won't allow a check to be made?? | Jacqueline | Using Forms | 3 | June 1st, 2004 04:28 PM |
change the title of a checkbox | daMike | Charts and Charting | 4 | October 16th, 2003 06:08 PM |