Discussion Locked

VB Code

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm going crazy here. I have a "find" Combo list to search a certain field. I have 3 different lists.
the codes are set up like this-
Private Sub Combo539_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Traveler] = " & Str(Me![Combo539])
Me.Bookmark = rs.Bookmark
Me.Combo421 = ""
Me.Combo424 = ""
End Sub
they reference each other so that when search one the other becomes blank.

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

Set rs = Me.Recordset.Clone
rs.FindFirst "[PurchaseOrder] = '" & Me![Combo424] & "'"
Me.Bookmark = rs.Bookmark
Me.Combo539 = ""
Me.Combo421 = ""

End Sub

I get a missing crystal report error when it's coded this way on other machines, but it works fine on my machine. When I take out the string commands and make it like the other fields (which aren't given an error btw) than gives a run-time error ><

I'm at a loss of what to do here and pulling my hair out. Maybe there's another way I can do the search set up? I'm thinking the problem might have to do with the number being a primary key and auto number?

2 replies

by rbuuck

Are you using Crystal Reports in your project? If so I think the other machines need the Crystal Reports .ocx to work with your project. You might check the "References" in your VB Project and see if there is a reference to the Crystal Reports .ocx and remove it if you are not using it. Hope this helps.

This discussion is closed to new replies.