Fliailing around in the Access mire

G

Guest

I have a cuatomer enquiry form based on the "tbl_Customer" that works fine. I
have a number of "Find" combo boxes that are used to Lookup fields in the
customer table and all to other text boxes in my Form are populated by the
code
Public Function util_Populate(frm As Form, strField As String, varInfo As
Variant, _
intType As Integer) As Boolean
If intType = 1 Then strCriteria = BuildCriteria(strField, dbInteger,
varInfo)
If intType = 2 Then strCriteria = BuildCriteria(strField, dbText, "'" &
varInfo & "'")

With frm.RecordsetClone
.FindFirst strCriteria
If Not .NoMatch Then
frm.Bookmark = .Bookmark
util_Populate = True
Else
util_Populate = False
End If
End With

End Function

I now want to look up items of stock and display some Stock information And
display the Customerinformation that might be associated with that Stock
Item vai a Contract (both the Stock Table and the Customer Table are linked
by a Contract Number)
I have a Tab Control in my Customers Form and I have tried to insert a Form
in that Tab Control. I have generated a Form "frm_Sub2_Stock" that is based
on the Stock Table and inserted that in the Tab Control in my Customers Form.
If I take a Serial Number from another Find Box and use the code above I find
that I get an error when I try to run it if the Original Form is not open. If
I Open the Original form, the code runs and the Original form displays the
information and Not the Copy that was inserted in the Tab.
Any thoughts please?
Thanks in advance RayC
 

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

Similar Threads

My use of "FindFirst" is not working 13
Filtering reserved characters 3
Strange 4
Embeded Forms 11
Embeded Sub Forms 2
embeded forms 6
Finding value in Form Load event 3
Record Find, First & Last 4

Top