bllgnn
Programmer
- Jan 20, 2002
- 42
I'm having trouble trying to set a new RecordSource and Requery my continuous popup form called pufrmOrderParts. It's a simple form listing PartNumber, Part Description, etc. from tblParts.
I'm using 3 option buttons and each one has a different query as a RecordSource for the form. The only difference in each query is that the records on the form are sorted in a different order.
All the fields are locked except a bound Yes/No checkbox. The error occures whether or not a record is selected.
When I run it, I get a Runtime error 2115 "The macro or function set to the BeforeUpdate or Validation Rule property for this field is preventing MyApplication from saving the data in the field."
Here is my code:
Public Sub SortOptions()
Select Case Me.fraSortOptions
Case 1 'Part #
Forms!pufrmOrderParts.RecordSource = "qryPartsOrderNumber"
Case 2 'Part Group
Forms!pufrmOrderParts.RecordSource = "qryPartsOrderGroup"
Case 3 'Part Description
Forms!pufrmOrderParts.RecordSource = "qryPartsOrderDescription"
End Select
Forms!pufrmOrderParts.Requery
End Sub
The underlying table does not have any validation rules. Can anyone tell me what is happening here?
I'm using 3 option buttons and each one has a different query as a RecordSource for the form. The only difference in each query is that the records on the form are sorted in a different order.
All the fields are locked except a bound Yes/No checkbox. The error occures whether or not a record is selected.
When I run it, I get a Runtime error 2115 "The macro or function set to the BeforeUpdate or Validation Rule property for this field is preventing MyApplication from saving the data in the field."
Here is my code:
Public Sub SortOptions()
Select Case Me.fraSortOptions
Case 1 'Part #
Forms!pufrmOrderParts.RecordSource = "qryPartsOrderNumber"
Case 2 'Part Group
Forms!pufrmOrderParts.RecordSource = "qryPartsOrderGroup"
Case 3 'Part Description
Forms!pufrmOrderParts.RecordSource = "qryPartsOrderDescription"
End Select
Forms!pufrmOrderParts.Requery
End Sub
The underlying table does not have any validation rules. Can anyone tell me what is happening here?