Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to move to a record from a combobox selection - error 1

Status
Not open for further replies.

CadDesigner

Programmer
Nov 25, 2003
18
FR
Hi all,

I am having an error message I can't place/ solve:

To find a record and display it on the form, I did exactly what was stated in MS -help article Q287658 (or explaned on
The moment I choose the desired record, the system comes back with the error:

"The expression After Update you entered as the event property setting produced the following error: A problem occured while 'Maintenance list' was communicating with the OLE server or activeX control.
* The expression may not result in the name of the macro, the name of a user-defined function, or [Event Procedure].
* There may have been an error evaluating the function, event, or macro."


('Maintenance list' is the name of my program)

I checked that the wizard created the sub combobox_AfterUpdate routine, the combobox was unbound and the AfterUpdate-event was listed in the properties of the combobox.

Private Sub Combo180_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[index] = " & Str(Me![Combo180])
Me.Bookmark = rs.Bookmark
End Sub


Any help / Idea's how to solve this will be greatly appreciated!!

Paul
 
Paul
I had a similar problem recently, and discovered that somehow the database was corrupted.

I created a new empty database and imported all the objects from the corrupted database. And it then worked fine.

Not exactly sure that is the problem in your case, but I thought I would mention this just in case.

By the way, "index" is a reserved word in Microsoft Access. Not sure this will cause the problem, but it is a reserved word.

Also, you might consider changing the name of your combo box from [Combo180] to something meaningful. It could pay dividends in maintenance down the line when you no longer remember what [Combo180] means.


Tom
 
Hi Tom,

Thanks for your reply.
I did what you said and guess what..... IT WORKED!!!
I am very very happy, because I struggled a long time with this problem.

Guys like you are great!!! [thumbsup2]

Thanks again,
Paul

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top