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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can Some one Correct My Error

Status
Not open for further replies.

tayyabakashif

Technical User
Joined
Feb 28, 2004
Messages
17
Location
PK
i have a combobox cbo which i use for search items in subform from main form invoice.
where i am wrong.
MY Question is
i am trying this but it gives us a message that the property is not for this object.
where i am wrong.
i give you some detail.i have main form invoice.
main form name is invoice
subform name is vitemtab.
combobox name is cbo
in subform the controlfield name is vcode1.which to look
"""""""""""""""Code"""""""""""""""""""""""""""

With Me!vitemtab.vcode1.Form.RecordsetClone
.FindFirst "vcode1 = " & cbo

If .NoMAtch Then
msgbox "no records"
Else
Me!vitemtab.vcode1.Form.Bookmark = .Bookmark
End If
End With
need help to create
 
Something like this (in the invoice form) ?
With Me!vitemtab.Form.RecordsetClone
.FindFirst "vcode1 = " & cbo
If .NoMAtch Then
MsgBox "no records"
Else
Me!vitemtab.Form.Bookmark = .Bookmark
End If
End With
If vcode1 is not defined as numeric in the underlaying table/query, replace this:
.FindFirst "vcode1 = " & cbo
by this:
.FindFirst "vcode1 = '" & cbo & "'"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top