P
Pam
I have a fairly simple Access db. I have created a form to enter information.
One of the controls is a list where the user can choose one of several
options (outsourced, scrap, rework or none). At the end of the form I have a
control for "open, on hold, or closed". I don't want the user to be able to
choose "closed" UNLESS one of the options in the other control is checked. If
they try to choose "closed" in this instance, it should look to that control,
and if nothing is checked, I'd like to warn the user that they must choose
one of those options before they can close the job.
It's not working and I think I know why, but I can't figure out how to fix
it. This is my code:
Private Sub Option379_MouseUp(Button As Integer, Shift As Integer, X As
Single, Y As Single)
If Me.ECO_ACTION_TAKEN = "" Then
MsgBox "You must choose a value"
Me.Option379.SetFocus
End If
End Sub
I am getting the following error:
"Runtime Error 438 Object doesn't support this property or method."
The "Me.ECO_ACTION_TAKEN" is a field in my ERF/ECO table. So, when the user
clicks on the "close" button, I want the form ... this code ... to look at
the table and find the value in that field. If it is blank, then show the
MsgBox. How do I reference the TABLE and that field in this code rather than
the form I'm on. In using the "Me.otherfield", isn't that what I am doing,
referencing the form I'm on? How do I reference the table itself?
I have some knowledge of VB, but am pretty rusty. Would also be appreciative
of any recommendations for a good book(s) on Access DB programming for
instances like this as I am getting more involved in doing this type of
thing. Thanks!
One of the controls is a list where the user can choose one of several
options (outsourced, scrap, rework or none). At the end of the form I have a
control for "open, on hold, or closed". I don't want the user to be able to
choose "closed" UNLESS one of the options in the other control is checked. If
they try to choose "closed" in this instance, it should look to that control,
and if nothing is checked, I'd like to warn the user that they must choose
one of those options before they can close the job.
It's not working and I think I know why, but I can't figure out how to fix
it. This is my code:
Private Sub Option379_MouseUp(Button As Integer, Shift As Integer, X As
Single, Y As Single)
If Me.ECO_ACTION_TAKEN = "" Then
MsgBox "You must choose a value"
Me.Option379.SetFocus
End If
End Sub
I am getting the following error:
"Runtime Error 438 Object doesn't support this property or method."
The "Me.ECO_ACTION_TAKEN" is a field in my ERF/ECO table. So, when the user
clicks on the "close" button, I want the form ... this code ... to look at
the table and find the value in that field. If it is blank, then show the
MsgBox. How do I reference the TABLE and that field in this code rather than
the form I'm on. In using the "Me.otherfield", isn't that what I am doing,
referencing the form I'm on? How do I reference the table itself?
I have some knowledge of VB, but am pretty rusty. Would also be appreciative
of any recommendations for a good book(s) on Access DB programming for
instances like this as I am getting more involved in doing this type of
thing. Thanks!