[RESOLVED] Data Control Runtime Error '3426'
Hello All
I am trying to setup a small database program for personal use, as i have done many times before. But for some reason i am having trouble getting this one to work.
I simply have a Data control filling in data bound text or combo boxes with the current selections data. But when i try to move to another selected record by using the
VB Code:
Dim Item As String
Item = dbcItemNumber.Text
Data1.Recordset.FindFirst "ItemNumber = '" & Item & "'"
i get an error...
Runtime Error '3426'
This action was canceled by an associated object.
This is frustraing as this is the same code i've used for other programs and they worked and are still working. Also if i get rid of the variable Item and just have
VB Code:
Data1.Recordset.FindFirst "ItemNumber = 'X001'"
It works.
Any ideas anyone?
Re: Data Control Runtime Error '3426'
That's strange.. try changing the variable name from Item to something different (as Item is a reserved word, it may be causing issues).
If that doesn't help, what is in dbcItemNumber.Text when you run this?
Re: Data Control Runtime Error '3426'
yes this is because of variable name u need to change it to some other name .... change it with Item1 or something like that
Re: Data Control Runtime Error '3426'
Hi,
I found out the solution to this last night. The dbcItemNumber was a data bound combobox which was used to display the items in a record source and then change the selected record to the one selected in the combobox. but when ever i changed the cobo box it must have got confused
what i had to do was remove the data binding from the . text property but keep the data binding to the list property so that i still had a populated list of all the recordset items but it didn't get confused.
thanks for your efforts though.
cheers