listbox selected -> text box question

J

Jayyde

Can someone help me figure out why the following code (problem line ***ed)
is throwing the the error:

"The macro or function set to the BeforeUpdate or ValidationRule property
for this field is preventing the DB from saving the data in this field."

when this control has neither a BeforeUpdate event nor a Validation Rule
either macroed or functioned. The click event here is literally all the
code there is for this list box.


Private Sub lstAvailable_Click()

Dim strItem As String

If (lstAvailable.ItemsSelected.Count = 1) Then

lstAvailable.SetFocus
strItem = lstAvailable.Column(1)

txtAddEditAvailable.SetFocus
txtAddEditAvailable.Text = strItem

ElseIf (lstAvailable.ItemsSelected.Count > 1) Then

lblMultipleAvailable.Visible = True

End If

End Sub
 
J

Jayyde

lol long day...didn't star the line. It's this one that the debugger
doesn't like:

txtAddEditAvailable.Text = strItem
 

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