A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Repost of Checkbox Help



 
 
Thread Tools Display Modes
  #1  
Old June 29th, 2004, 02:06 PM
ChrisBat
external usenet poster
 
Posts: n/a
Default 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  
Old June 29th, 2004, 02:28 PM
Rick B
external usenet poster
 
Posts: n/a
Default 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  
Old June 29th, 2004, 03:29 PM
John Vinson
external usenet poster
 
Posts: n/a
Default 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  
Old June 29th, 2004, 05:09 PM
ChrisBat
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 08:35 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.