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
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