Check box question...

sjl

Registered User.
Local time
Today, 15:05
Joined
Aug 8, 2007
Messages
221
I need some general input.

A colleague for whom I am developing a data base wants a report that lists:

ManagerName
DueDate
1stNotification
2ndNotification


The first 2 fields are in a table. The Notification fields are calculated fields (based on Due Date). I created them in a query.

But, the colleague now wants the ability of "checking" if she sent a reminder at each of the Notification dates.

Would I need to create these check boxes in a table?
Or, should I create them in a form?

(I tried placing unbound check boxes in a form, but when I click one box (for one record), all the boxes are checked.

thanks in advance.
sjl
 
Check box question (2)

Thanks Ken,
I took your suggestion, and things are working fine. THANKS SO MUCH:D

However, I'd like to do the following embellishment:

When the 1stNotification has yet to be sent, and the checkbox is not checked, I'd like the font of the 1stNotificationDate to be RED.

When the 1stNotification has been sent, and the checkbox is checked, I'd like the red font of the 1stNotificationDate to turn off.

To re-cap, my fields are:
Manager
DueDate
1stNotificationDate
1stNotification sent (checkbox)

etc....

thanks,
 
As long as you are not doing this on a continuous form you should be able to put code in the forms OnCuurent event to set this.

Something like:

If me!mycheck then
me!MyLabel.font = red
else
me!MyLabel.font = black
end if

This is not the exact code but you get the idea...
:)
ken
 
Thanks Ken,

I tried the following:

Private Sub Form_Current()

'when checkbox is unchecked
If Me!chk1stNotification = 0 Then
Me!firstNotification.ForeColor = 255
Me!firstNotification.FontBold = True

'when checkbox is checked
Else
Me!firstNotification.ForeColor = 0
End If
End Sub

The red (255) and bold is working, but when I check the box, it is not going black (0) in text color.

Any ideas?

sjl
 
Sorry, You also need to put the same code in the check box's on change event...

:)
ken
 
Ken,
Thanks for the tip!

I went to find the On Change event for the Check Box but did not find one. I do see an On Change event for the Text Box (the notification date).

I will try putting the code in the check box's After Update event....
 
I placed this into the After Update event for the Check Box (as well as in the Form's OnCurrent event)

Private Sub chk1stNotification_AfterUpdate()
If Me!chk1stNotification = 0 Then
Me!firstNotification.ForeColor = 255
Me!firstNotification.FontBold = True
Else
Me!firstNotification.ForeColor = 0
Me!firstNotification.FontBold = False
End If
End Sub



This almost works (red, bold toggles on/off with check mark)...HOWEVER, if I place a checkmark in record #1's check box, the whole column's Notification Date turns red.

Any ideas how I can get the red, bold to turn of/off on a record by record basis?
 
Oops. I see that you had said "as long as you are not doing this on a continuing form...".

I tried it--it works on a Single Form default view.

But, my colleague still wants to see Red Bold when the box is not checked--either on a Form or a Report....and she wants to see all observations at once....:confused:

Any other ideas?


thanks,
sjl
 
I think you can do this with conditional formatting. select the textbox in design view then do Format->Conditional Formatting.

:)
ken
 
Thanks Ken.

I've tried conditional formatting....but can't get it to work when I want to span more than 1 variable.

So, e.g., I can get the notification date to be Red/not Red (based on itself)....but conditional formatting doesn't seem to let me format based on whether the check box (a different variable) is, e.g., checked or not checked.

Am I missing something here...
 
Am I missing something here...
Yes, because when you select the conditional formatting you select EXPRESSION IS and then use

[YourFieldName]="Whatever" And [YourCheckboxField] = True

And so on
 
thanks!!!!!! I knew there had to be more functionality to Conditional Formatting
 
Hum... I suppose you add a column in the underlying query that put something like an asterisk in the field in the condition was met. Then place this asterisk field next the one you want to draw attention to in your report.
???
ken
 
It works like a charm, Bob. Thanks a bunch.:D
 

Users who are viewing this thread

Back
Top Bottom