D
Donna
I've got a form that is bound to a query. This form is a follow-up for a
work order. I have placed an option group on the form, with 5 options, to
determine the final status of the work order. I want to make sure one of the
options is selected before the user moves to another record. I can't seem to
find the right way to evaluate the option group. It is bound to a number
field.
I have tried using the After Update event but that does not work unless I
actually click on an option. There is only one other stop after leaving the
option group, to a text box that is used for notes, that seldom will have
anything typed in it. I've tried using the BeforeUpdate event on this text
box to see if the option group is empty and I can not get that work either.
I've spent hours on this, reading all I can get my hands on, and still have
not found the right way to assess the option group.
I want to make sure there is a completion date entered and a final status
option checked before leaving the record. Also, is it possible to stay on
this record and move the focus back to a combo box? I have a combo box for
the user to select the work order number. If the user tabs through the
controls, it goes to the next record. The next record may not be the same
thing listed in the combo box because it is not bound to the form. Once a
selection is made from the combo box, the record matches with the selection,
but it sure could cause some problems. It would be great if it would not go
to the next record when it gets to the end of the form. I don't know how to
handle that situation.
I'm really pressed for time also. I've spent 2 full days trying to figure it
out myself, but I'm not having any luck. I sure could use some help.
Another dilema I have with that combo box.... I have placed a really useful
filtering combo box in the form's header. I used the ValueList for the Row
Source Type in this combo box and have placed the text for All, Today,
Yesterday, Past 7 days and past 14 days as the values and have a macro set
up for them. Afterwards, I used the menu item to convert the macro to VBA
and now it's in the VBA code for the form instead of the macro. That's
really handy. As useful as the filter is, it still leaves the form
vulnerable to getting on the wrong record. As a precaution, I have included
the work order number next to the combo box, with a label that says You are
on record: work order #. If they don't match, the user gets a message. I'd
still like the combo list that is showing the work order numbers to only
show the filtered ones. Again, I don't know how to do that.
I'm primarily concerned with the option group have a selection as long as
there is a completion date. Again, I am revisiting an existing record, so
setting the validation at the table level would create an error message.
I've tried using:
if me.optgrpFinalStatus = 0 then msgbox "check one" (condensed version)
How do I look at the date? Its easier if its null, how do I refer to the
value thats in it?
If there is a completion date and the final status option has not been
selected, then tell the user to check an option or cancel.
And also, when the user gets to the end of the record, don't go to the next
record, but return to the combo box.
Sorry for the lengthy message... my brain is really tired and confused
Donna
work order. I have placed an option group on the form, with 5 options, to
determine the final status of the work order. I want to make sure one of the
options is selected before the user moves to another record. I can't seem to
find the right way to evaluate the option group. It is bound to a number
field.
I have tried using the After Update event but that does not work unless I
actually click on an option. There is only one other stop after leaving the
option group, to a text box that is used for notes, that seldom will have
anything typed in it. I've tried using the BeforeUpdate event on this text
box to see if the option group is empty and I can not get that work either.
I've spent hours on this, reading all I can get my hands on, and still have
not found the right way to assess the option group.
I want to make sure there is a completion date entered and a final status
option checked before leaving the record. Also, is it possible to stay on
this record and move the focus back to a combo box? I have a combo box for
the user to select the work order number. If the user tabs through the
controls, it goes to the next record. The next record may not be the same
thing listed in the combo box because it is not bound to the form. Once a
selection is made from the combo box, the record matches with the selection,
but it sure could cause some problems. It would be great if it would not go
to the next record when it gets to the end of the form. I don't know how to
handle that situation.
I'm really pressed for time also. I've spent 2 full days trying to figure it
out myself, but I'm not having any luck. I sure could use some help.
Another dilema I have with that combo box.... I have placed a really useful
filtering combo box in the form's header. I used the ValueList for the Row
Source Type in this combo box and have placed the text for All, Today,
Yesterday, Past 7 days and past 14 days as the values and have a macro set
up for them. Afterwards, I used the menu item to convert the macro to VBA
and now it's in the VBA code for the form instead of the macro. That's
really handy. As useful as the filter is, it still leaves the form
vulnerable to getting on the wrong record. As a precaution, I have included
the work order number next to the combo box, with a label that says You are
on record: work order #. If they don't match, the user gets a message. I'd
still like the combo list that is showing the work order numbers to only
show the filtered ones. Again, I don't know how to do that.
I'm primarily concerned with the option group have a selection as long as
there is a completion date. Again, I am revisiting an existing record, so
setting the validation at the table level would create an error message.
I've tried using:
if me.optgrpFinalStatus = 0 then msgbox "check one" (condensed version)
How do I look at the date? Its easier if its null, how do I refer to the
value thats in it?
If there is a completion date and the final status option has not been
selected, then tell the user to check an option or cancel.
And also, when the user gets to the end of the record, don't go to the next
record, but return to the combo box.
Sorry for the lengthy message... my brain is really tired and confused
Donna