Bound Option Group

G

Guest

I have the following on a form in Access 97 and get a compile error but it
works in Access 2000. Can someone help me and tell me what might be wrong? I
do have text box on the form for Type Of Request. This is an option group
which converts the numbers to text.

Private Sub Form_Current()
Select Case TYPE_OF_REQUEST.Value
Case "PROSPECT SURVEY"
TYPE_OF_REQUEST.Value = 1
Case "INITIAL ACCOUNT EVALUATION"
TYPE_OF_REQUEST.Value = 2
Case "UPDATE SURVEY/PRE-RENEWAL"
TYPE_OF_REQUEST.Value = 3
Case "ONE SHOT SURVEY"
TYPE_OF_REQUEST.Value = 4
Case "ERGONOMIC SURVEY"
TYPE_OF_REQUEST.Value = 5
Case Else
TYPE_OF_REQUEST.Value = Null
End Select
End Sub


Private Sub Frame157_AfterUpdate()
Select Case TYPE_OF_REQUEST.Value
Case 1
TYPE_OF_REQUEST.Value = "PROSPECT SURVEY"
Case 2
TYPE_OF_REQUEST.Value = "INITIAL ACCOUNT EVALUATION"
Case 3
TYPE_OF_REQUEST.Value = "UPDATE SURVEY/PRE-RENEWAL"
Case 4
TYPE_OF_REQUEST.Value = "ONE SHOT SURVEY"
Case 5
TYPE_OF_REQUEST.Value = "ERGONOMIC SURVEY"
End Select
End Sub
 
G

Guest

I keep testing and errors. It seems to be on Type_of_Request.

How would one write that table field below if for Access 97. I got the Form
Current to run by using "Type_of_Request" but the afterupdate keeps erroring
on Type_of_Request no matter what I try.

Help
 
J

John Vinson

I keep testing and errors. It seems to be on Type_of_Request.

How would one write that table field below if for Access 97. I got the Form
Current to run by using "Type_of_Request" but the afterupdate keeps erroring
on Type_of_Request no matter what I try.

Does the Name property of the control actually have the underscores in
it? If not, try [Type of Request] in brackets rather than the
underscores.

John W. Vinson[MVP]
 
G

Guest

John, yes you were correct as late yesterday I tried the brackets. Always
interesting between different versions as I have another issue I will post
later.

But at least this one is solved.

Thanks for the confirmation on this one.

John Vinson said:
I keep testing and errors. It seems to be on Type_of_Request.

How would one write that table field below if for Access 97. I got the Form
Current to run by using "Type_of_Request" but the afterupdate keeps erroring
on Type_of_Request no matter what I try.

Does the Name property of the control actually have the underscores in
it? If not, try [Type of Request] in brackets rather than the
underscores.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top