Combo Box Question

R

Ray Milhon

I have an Access Database with a form on it that has 3 combo boxes 1 Flex
grid and 1 list box. The combo boxes display specific data based on a user
selection in the flex grid or the list box. the flex grid shows current
appointments and the list box shows cancelled appointments. The combo boxes
show the detail of the appointment. If the user selects an item in the flex
grid the combo boxes populate correctly if the user selects an item in the
listbox the combo boxes error.

Both click events use the same VBA Subroutine to populate the combo boxes
using a recordset the only difference being the where clause of the SQL
Statment populating the recordset.

The error that comes up says The macro or function set to the BeforeUpdate
or ValidationRule property for this field is preventing Scheduling from
saving the data in the field.

The line of code that generates the error is
cboSurgeon.listindex = intidx

intidx is an integer field that passes the the ID of the selected item.

Any ideas would be appreciated.
 
J

Jeanette Cunningham

Hi Ray,
Access is finding an error for the BeforeUpdate event of the form or the
listbox or there is a validation rule on the field used for the listbox.
Comment out any code on the before update event for the listbox and run the
form, see if the error appears.
If you have a validation rule in the table field for the field for the
listbox, do a test with the validation rule removed to see if the error
appears.
You may need to comment out the code on the form's before update event as a
test, run the form, see if the error appears.

Jeanette Cunningham
 

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