General discussion

Locked

VB Code

By natasha.epperson ·
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?

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by nicole_0904 In reply to VB Code

http://www.daniweb.com/techtalkforums/forum4.html

Go to this link. I have found a lot of help with VB there.

Collapse -

by rbuuck In reply to VB Code

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.

Back to Software Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums